How to use auditwheel - 10 common examples

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_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_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_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 / unit / test_elfpatcher.py View on Github external
def test_patchelf_check_output_fail(check_output):
    check_output.side_effect = CalledProcessError(1, "patchelf --version")
    with pytest.raises(ValueError, match="Could not call"):
        Patchelf()
github pypa / auditwheel / tests / unit / test_elfpatcher.py View on Github external
def test_set_soname(self, check_call, _0, _1):
        patcher = Patchelf()
        filename = "test.so"
        soname_new = "TEST_NEW"
        patcher.set_soname(filename, soname_new)
        check_call.assert_called_once_with(['patchelf', '--set-soname',
                                            soname_new, filename])
github pypa / auditwheel / tests / unit / test_elfpatcher.py View on Github external
def test_set_rpath(self, check_call, _0, _1):
        patcher = Patchelf()
        patcher.set_rpath("test.so", "$ORIGIN/.lib")
        check_call_expected_args = [call(['patchelf', '--remove-rpath',
                                          'test.so']),
                                    call(['patchelf', '--force-rpath',
                                          '--set-rpath', '$ORIGIN/.lib',
                                          'test.so'])]

        assert check_call.call_args_list == check_call_expected_args
github pypa / auditwheel / tests / unit / test_elfpatcher.py View on Github external
def test_get_rpath(self, _0, check_output, _1):
        patcher = Patchelf()
        check_output.return_value = b"existing_rpath"
        result = patcher.get_rpath("test.so")
        check_output_expected_args = [call(['patchelf', '--print-rpath',
                                            'test.so'])]

        assert result == check_output.return_value.decode()
        assert check_output.call_args_list == check_output_expected_args
github pypa / auditwheel / tests / unit / test_elfpatcher.py View on Github external
def test_patchelf_version_check(check_output, version):
    check_output.return_value.decode.return_value = "patchelf {}".format(version)
    Patchelf()
github pypa / auditwheel / tests / unit / test_elfpatcher.py View on Github external
def test_replace_needed(self, check_call, _0, _1):
        patcher = Patchelf()
        filename = "test.so"
        soname_old = "TEST_OLD"
        soname_new = "TEST_NEW"
        patcher.replace_needed(filename, soname_old, soname_new)
        check_call.assert_called_once_with(['patchelf', '--replace-needed',
                                            soname_old, soname_new, filename])