How to use the auditwheel.policy.get_arch_name function in auditwheel

To help you get started, we’ve selected a few auditwheel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pypa / auditwheel / tests / unit / test_policy.py View on Github external
def test_64bits_arch_name(machine_mock, reported_arch, expected_arch):
    machine_mock.return_value = reported_arch
    machine = get_arch_name()
    assert machine == expected_arch
github pypa / auditwheel / tests / unit / test_policy.py View on Github external
def test_get_by_priority(self):
        _arch = get_arch_name()
        assert get_policy_name(80) == 'manylinux2014_{}'.format(_arch)
        if _arch in {'x86_64', 'i686'}:
            assert get_policy_name(90) == 'manylinux2010_{}'.format(_arch)
            assert get_policy_name(100) == 'manylinux1_{}'.format(_arch)
        assert get_policy_name(0) == 'linux_{}'.format(_arch)
github pypa / auditwheel / tests / unit / test_policy.py View on Github external
def test_get_by_name(self):
        _arch = get_arch_name()
        assert get_priority_by_name("manylinux2014_{}".format(_arch)) == 80
        if _arch in {'x86_64', 'i686'}:
            assert get_priority_by_name("manylinux2010_{}".format(_arch)) == 90
            assert get_priority_by_name("manylinux1_{}".format(_arch)) == 100
github pypa / auditwheel / tests / integration / test_manylinux.py View on Github external
import os
import os.path as op
import re
import shutil
import sys
import logging
import zipfile
from auditwheel.policy import get_priority_by_name, get_arch_name
from elftools.elf.elffile import ELFFile


logger = logging.getLogger(__name__)


ENCODING = 'utf-8'
PLATFORM = get_arch_name()
MANYLINUX1_IMAGE_ID = 'quay.io/pypa/manylinux1_{}'.format(PLATFORM)
MANYLINUX2010_IMAGE_ID = 'quay.io/pypa/manylinux2010_{}'.format(PLATFORM)
MANYLINUX2014_IMAGE_ID = 'quay.io/pypa/manylinux2014_{}:latest'.format(PLATFORM)
if PLATFORM in {'i686', 'x86_64'}:
    MANYLINUX_IMAGES = {
        'manylinux1': MANYLINUX1_IMAGE_ID,
        'manylinux2010': MANYLINUX2010_IMAGE_ID,
        'manylinux2014': MANYLINUX2014_IMAGE_ID,
    }
else:
    MANYLINUX_IMAGES = {
        'manylinux2014': MANYLINUX2014_IMAGE_ID,
    }
DOCKER_CONTAINER_NAME = 'auditwheel-test-manylinux'
PYTHON_MAJ_MIN = [str(i) for i in sys.version_info[:2]]
PYTHON_ABI = 'cp{0}-cp{0}{1}'.format(''.join(PYTHON_MAJ_MIN), 'm' if sys.version_info.minor < 8 else '')
github pypa / auditwheel / tests / unit / test_policy.py View on Github external
def test_32bits_arch_name(machine_mock, reported_arch, expected_arch):
    machine_mock.return_value = reported_arch
    machine = get_arch_name()
    assert machine == expected_arch