Name: auditwheel Version: 4.0.0 Release: 1%{?dist} Summary: Cross-distribution Linux wheels auditing and relabeling License: MIT URL: https://github.com/pypa/auditwheel Source0: %{pypi_source} # Don't installs self in tox deps, merged upstream Patch1: https://github.com/pypa/auditwheel/pull/319.patch BuildArch: noarch BuildRequires: python3-devel # For tests and runtime BuildRequires: patchelf >= 0.9 Requires: patchelf >= 0.9 # From auditwheel/_vendor/wheel/__init__.py # See the rationale in https://github.com/pypa/auditwheel/pull/275 # This is also MIT %global wheel_version 0.36.2 Provides: bundled(python3dist(wheel)) = %{wheel_version} %description auditwheel is a command-line tool to facilitate the creation of Python wheel packages for Linux (containing pre-compiled binary extensions) that are compatible with a wide variety of Linux distributions, consistent with the PEP 600 manylinux_x_y, PEP 513 manylinux1, PEP 571 manylinux2010 and PEP 599 manylinux2014 platform tags. auditwheel show: shows external shared libraries that the wheel depends on (beyond the libraries included in the manylinux policies), and checks the extension modules for the use of versioned symbols that exceed the manylinux ABI. auditwheel repair: copies these external shared libraries into the wheel itself, and automatically modifies the appropriate RPATH entries such that these libraries will be picked up at runtime. This accomplishes a similar result as if the libraries had been statically linked without requiring changes to the build system. Packagers are advised that bundling, like static linking, may implicate copyright concerns. %prep %autosetup -p1 # Coverage, we don't need that # https://github.com/pypa/auditwheel/issues/322 sed -E -i '/\bpytest-cov\b/d' test-requirements.txt # Linters, we don't need those # https://github.com/pypa/auditwheel/issues/322 sed -E -i '/\b(flake8|mypy)\b/d' test-requirements.txt # pypatchelf is patchelf, packaged for pip -- we'll use the native one instead sed -E -i '/\bpypatchelf\b/d' test-requirements.txt # docker is only used for integration testing we don't run sed -E -i '/\bdocker\b/d' test-requirements.txt # There is an undeclared dependency on setuptools/pkg_resources, # once https://github.com/pypa/auditwheel/pull/307 is released, this can be removed grep 'import pkg_resources' auditwheel/main.py # make sure this is still relevant echo setuptools >> requirements.txt %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %install %pyproject_install %pyproject_save_files auditwheel # https://github.com/pypa/auditwheel/issues/321 cp -p auditwheel/policy/*.json %{buildroot}%{python3_sitelib}/auditwheel/policy/ %check # We cannot run %%tox here: # - it runs pytest with --doctest-modules and fails: # https://github.com/pypa/auditwheel/issues/320 # - it runs integration tests in docker manylinux images %pytest -v tests/unit # Assert the bundled wheel version export PYTHONPATH=%{buildroot}%{python3_sitelib} test "$(%{python3} -c 'from auditwheel._vendor import wheel; print(wheel.__version__)')" == "%{wheel_version}" %files -f %{pyproject_files} %doc README.rst %{_bindir}/auditwheel # https://github.com/pypa/auditwheel/issues/321 %{python3_sitelib}/auditwheel/policy/*.json %changelog * Fri Aug 13 2021 Miro HronĨok - 4.0.0-1 - Initial package - Fixes: rhbz#1993535