pypa/auditwheel

Use auditwheel show from python

SanPen opened this issue · 4 comments

SanPen commented

Hi,

I would like to automate the wheel renaming with python and I'd like to know how to get the suggested label for linux using python.

For instance, running auditwheel show mywheel_0.0.1.whl I get:

The wheel references external versioned symbols in these
system-provided shared libraries: libgcc_s.so.1 with versions
{'GCC_4.0.0', 'GCC_3.0'}, libgomp.so.1 with versions {'GOMP_1.0',
'GOMP_4.0', 'OMP_1.0'}, libm.so.6 with versions {'GLIBC_2.2.5',
'GLIBC_2.29'}, libc.so.6 with versions {'GLIBC_2.4', 'GLIBC_2.32',
'GLIBC_2.34', 'GLIBC_2.6', 'GLIBC_2.2.5', 'GLIBC_2.3.2', 'GLIBC_2.3',
'GLIBC_2.33', 'GLIBC_2.14', 'GLIBC_2.28', 'GLIBC_2.3.4', 'GLIBC_2.17',
'GLIBC_2.7'}, libstdc++.so.6 with versions {'GLIBCXX_3.4.18',
'GLIBCXX_3.4.19', 'GLIBCXX_3.4.29', 'CXXABI_1.3.3', 'CXXABI_1.3.8',
'GLIBCXX_3.4', 'CXXABI_1.3.13', 'GLIBCXX_3.4.21', 'GLIBCXX_3.4.17',
'GLIBCXX_3.4.30', 'GLIBCXX_3.4.20', 'CXXABI_1.3', 'GLIBCXX_3.4.9',
'CXXABI_1.3.2', 'GLIBCXX_3.4.22', 'CXXABI_1.3.11', 'CXXABI_1.3.5',
'CXXABI_1.3.7', 'GLIBCXX_3.4.26', 'GLIBCXX_3.4.14', 'GLIBCXX_3.4.11',
'CXXABI_1.3.9', 'GLIBCXX_3.4.15'}

This constrains the platform tag to "manylinux_2_35_x86_64". In order
to achieve a more compatible tag, you would need to recompile a new
wheel from source on a system with earlier versions of these
libraries, such as a recent manylinux image.

I'd like to find the label manylinux_2_35_x86_64 programatically.

At the moment I think your only option is to use a regex to parse it. For this to better work auditwheel either needs a public API, or a better way to represent this information. For example, the show subcommand could take flags to show only certain details, or a full blown --json or similar to output structured data.

SanPen commented

how can you use the json output feature?

auditwheel show my_pkg.whl --json fails.

I'm on version 5.4.0.

Sorry, maybe this wasn't clear from my comment: the --json flag doesn't exist and this would have to be built.

SanPen commented

oh, sorry for the misunderstanding.

Yes, definitely +1 for that.