#42 Verify bundled provides with %{_rpmconfigdir}/pythonbundles.py, use %pytest
Merged 3 years ago by churchyard. Opened 3 years ago by churchyard.
rpms/ churchyard/python-setuptools 47.3.1_bundled  into  master

file modified
+11 -6
@@ -42,7 +42,8 @@ 

  BuildRequires:  python3-wheel

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

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

- BuildRequires:  python3-rpm-generators

+ # The minimal version is for bundled provides verification script

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

  %endif # without bootstrap

  

  %description
@@ -54,12 +55,13 @@ 

  execute the software that requires pkg_resources.

  

  # Virtual provides for the packages bundled by setuptools.

- # You can find the versions in setuptools/setuptools/_vendor/vendored.txt

+ # You can generate it with:

+ # %%{_rpmconfigdir}/pythonbundles.py pkg_resources/_vendor/vendored.txt

  %global bundled %{expand:

+ Provides: bundled(python3dist(appdirs)) = 1.4.3

  Provides: bundled(python3dist(packaging)) = 16.8

  Provides: bundled(python3dist(pyparsing)) = 2.2.1

- Provides: bundled(python3dist(six)) = 1.10.0

- Provides: bundled(python3dist(appdirs)) = 1.4.3

+ Provides: bundled(python3dist(six)) = 1.10

  }

  

  %package -n python3-setuptools
@@ -144,10 +146,13 @@ 

  

  %if %{with tests}

  %check

+ # Verify bundled provides are up to date

+ %{_rpmconfigdir}/pythonbundles.py pkg_resources/_vendor/vendored.txt --compare-with '%{bundled}'

+ 

+ # Upstream tests

  # --ignore=pavement.py:

  #   pavement.py is only used by upstream to do releases and vendoring, we don't ship it

- PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) pytest-%{python3_version} \

-     --ignore=pavement.py

+ PYTHONPATH=$(pwd) %pytest --ignore=pavement.py

  %endif # with tests

  

  

See 2 individual commits.

rebased onto 7fca5142870e404dc7e64060f08ce73672dc20a2

3 years ago

1 new commit added

  • Switch to %pytest to simplify the spec file
3 years ago

Build succeeded.

Build succeeded.

+1. Patch LGTM; simple-koji-ci logs show that pytest tests still run; I tried changing a version number and got:

Missing expected provides:
    - Provides: bundled(python3dist(pyparsing)) = 2.2.1
Redundant unexpected provides:
    + Provides: bundled(python3dist(pyparsing)) = 2.2.1234

Please merge after squashing the typo

rebased onto 49b0dc3

3 years ago

Typo: Verify

Fixed, thanks!

Pull-Request has been merged by churchyard

3 years ago

Build succeeded.