Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new architectures in manylinux2014 #202

Merged
merged 1 commit into from
Nov 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions auditwheel/policy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@
# https://docs.python.org/3/library/platform.html#platform.architecture
bits = 8 * (8 if sys.maxsize > 2 ** 32 else 4)

_PLATFORM_REPLACEMENT_MAP = {
'manylinux1_x86_64': ['linux_x86_64'],
'manylinux2010_x86_64': ['linux_x86_64'],
'manylinux2014_x86_64': ['linux_x86_64'],
'manylinux1_i686': ['linux_i686'],
'manylinux2010_i686': ['linux_i686'],
'manylinux2014_i686': ['linux_i686'],
}

_PLATFORM_REPLACEMENT_MAP = {}
for _policy in {'manylinux1', 'manylinux2010'}:
for _arch in {'x86_64', 'i686'}:
_key = '{}_{}'.format(_policy, _arch)
_value = 'linux_{}'.format(_arch)
_PLATFORM_REPLACEMENT_MAP[_key] = [_value]

for _policy in {'manylinux2014'}:
for _arch in {
'x86_64', 'i686', 'aarch64', 'armv7l', 'ppc64', 'ppc64le', 's390x'
}:
_key = '{}_{}'.format(_policy, _arch)
_value = 'linux_{}'.format(_arch)
_PLATFORM_REPLACEMENT_MAP[_key] = [_value]


def get_arch_name():
Expand All @@ -33,9 +40,13 @@ def get_arch_name():


with open(join(dirname(abspath(__file__)), 'policy.json')) as f:
_POLICIES = json.load(f)
for p in _POLICIES:
p['name'] = p['name'] + '_' + _ARCH_NAME
_POLICIES = []
_policies_temp = json.load(f)
for _p in _policies_temp:
_name = _p['name'] + '_' + _ARCH_NAME
if _name in _PLATFORM_REPLACEMENT_MAP or _name.startswith('linux'):
_p['name'] = _name
_POLICIES.append(_p)

POLICY_PRIORITY_HIGHEST = max(p['priority'] for p in _POLICIES)
POLICY_PRIORITY_LOWEST = min(p['priority'] for p in _POLICIES)
Expand Down