#90 Only verify bundled provides --without bootstrap, supply all vendor files at once
Merged a year ago by churchyard. Opened a year ago by churchyard.
rpms/ churchyard/python-setuptools bundles  into  rawhide

file modified
+7 -11
@@ -56,8 +56,8 @@ 

  BuildRequires:  python%{python3_pkgversion}-setuptools

  # python3 bootstrap: this is built before the final build of python3, which

  # adds the dependency on python3-rpm-generators, so we require it manually

- # The minimal version is for bundled provides verification script

- BuildRequires:  python3-rpm-generators >= 11-8

+ # The minimal version is for bundled provides verification script to accept multiple files as input

+ BuildRequires:  python3-rpm-generators >= 12-8

  %endif

  

  %description
@@ -69,11 +69,8 @@ 

  execute the software that requires pkg_resources.

  

  # Virtual provides for the packages bundled by setuptools.

- # Bundled packages are defined in two files:

- # - pkg_resources/_vendor/vendored.txt, and

- # - setuptools/_vendor/vendored.txt

- # Merge them to one and then generate the list with:

- # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{python3_pkgversion}dist' allvendor.txt

+ # Bundled packages are defined in multiple files. Generate the list with:

+ # %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{python3_pkgversion}dist' */_vendor/vendored.txt

  %global bundled %{expand:

  Provides: bundled(python%{python3_pkgversion}dist(appdirs)) = 1.4.3

  Provides: bundled(python%{python3_pkgversion}dist(importlib-metadata)) = 4.11.1
@@ -171,11 +168,10 @@ 

  

  

  %check

- # Verify bundled provides are up to date, pythonbundles.py uses pkg_resources from $PWD 

- cat pkg_resources/_vendor/vendored.txt setuptools/_vendor/vendored.txt > allvendor.txt

- PYTHONPATH=. %{_rpmconfigdir}/pythonbundles.py allvendor.txt --namespace 'python%{python3_pkgversion}dist' --compare-with '%{bundled}'

- 

  %if %{without bootstrap}

+ # Verify bundled provides are up to date

+ %{_rpmconfigdir}/pythonbundles.py */_vendor/vendored.txt --namespace 'python%{python3_pkgversion}dist' --compare-with '%{bundled}'

+ 

  # Regression test, the wheel should not be larger than 900 kB

  # https://bugzilla.redhat.com/show_bug.cgi?id=1914481#c3

  test $(stat --format %%s %{_pyproject_wheeldir}/%{python_wheel_name}) -lt 900000

The initial build for new Python version does not yet have the script available.
Multiple input files for the script are supported since Fedora 35,
but we keep the versioned BuildRequires for RHEL's sake.

The $PWD makes no sense --without bootstrap and the script should not even import pkg_resources,
see https://src.fedoraproject.org/rpms/python-rpm-generators/pull-request/59

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/ac81e1e7cb4140e8ba7783b02c29b273

This makes sense to me, ship it.

  • [x] PR solves the issue it claims to address
  • [x] Resulting RPM package is installable on the destination Fedora release
  • [x] No dependent RPM packages will stop being installable when the PR is merged and built - it doesn't affect any packages directly
  • [x] PR is tested sufficiently and the test results are OK - there's a check present, the diff of generated provides before/now is clean, package builds with and without boostrap.
  • [x] PR is open against all relevant Fedora releases
  • [-] (If PR is open against more Fedora releases) branches don't diverge unnecessarily
  • [-] (If PR is open against older Fedora releases) PR doesn't contain backwards incompatible changes
  • [x] Each commit's scope is sane (there are no irrelevant changes combined together)
  • [x] Each commit message is relevant
  • [-] (If it's linked), the right (problem, product) BZ ticket is referenced
  • [-] (If it's linked), BZ ticket reference is in the correct format in %changelog and/or commit message
  • [-] (If needed) Release is bumped
  • [-] (When adding patches) Patch purpose is documented in the specfile
  • [-] (When backporting patches) Patch origin and/or authorship is traceable
  • [-] (When creating patches from scratch) The patch is proposed upstream or justified as downstream-only

Pull-Request has been merged by churchyard

a year ago
Metadata