#419 [F39] Fix handling of tox 4 provision without tox minversion
Merged 8 months ago by churchyard. Opened 8 months ago by churchyard.
rpms/ churchyard/pyproject-rpm-macros minversion-none  into  f39

file modified
+13 -1
@@ -77,6 +77,12 @@ 

  Requires:       /usr/bin/find

  Requires:       /usr/bin/sed

  

+ # This package requires the %%generate_buildrequires functionality.

+ # It has been introduced in RPM 4.15 (4.14.90 is the alpha of 4.15).

+ # What we need is rpmlib(DynamicBuildRequires), but that is impossible to (Build)Require.

+ Requires:       (rpm-build >= 4.14.90 if rpm-build)

+ BuildRequires:  rpm-build >= 4.14.90

+ 

  %description

  These macros allow projects that follow the Python packaging specifications

  to be packaged as RPMs.
@@ -95,6 +101,7 @@ 

  %package -n pyproject-srpm-macros

  Summary:        Minimal implementation of %%pyproject_buildrequires

  Requires:       (pyproject-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} if pyproject-rpm-macros)

+ Requires:       (rpm-build >= 4.14.90 if rpm-build)

  

  %description -n pyproject-srpm-macros

  This package contains a minimal implementation of %%pyproject_buildrequires.
@@ -109,6 +116,9 @@ 

  %setup -c -T

  cp -p %{sources} .

  

+ %generate_buildrequires

+ # nothing to do, this is here just to assert we have that functionality

+ 

  %build

  # nothing to do, sources are not buildable

  
@@ -161,8 +171,10 @@ 

  

  

  %changelog

- * Wed Sep 13 2023 Karolina Surma <ksurma@redhat.com> - 1.10.0-1

+ * Wed Sep 13 2023 Python Maint <python-maint@redhat.com> - 1.10.0-1

  - Add %%_pyproject_check_import_allow_no_modules for automated environments

+ - Fix handling of tox 4 provision without and explicit tox minversion

+ - Fixes: rhbz#2240590

  

  * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

file modified
+1 -1
@@ -386,7 +386,7 @@ 

          provision_content = provision.read()

          if provision_content and r.returncode != 0:

              provision_requires = json.loads(provision_content)

-             if 'minversion' in provision_requires:

+             if provision_requires.get('minversion') is not None:

                  requirements.add(f'tox >= {provision_requires["minversion"]}',

                                   source='tox provision (minversion)')

              if 'requires' in provision_requires:

@@ -589,6 +589,43 @@ 

        python3dist(inst)

    result: 0

  

+ tox provision no minversion:

+   installed:

+     setuptools: 50

+     wheel: 1

+     tox: 3.5.3

+     tox-current-env: 0.0.6

+   toxenv:

+     - py3

+   setup.py: |

+     from setuptools import setup

+     setup(

+         name='test',

+         version='0.1',

+     )

+   tox.ini: |

+     [tox]

+     requires =

+         setuptools > 40

+         wheel > 2

+   expected:

+     - |  # tox 3

+       python3dist(setuptools) >= 40.8

+       python3dist(wheel)

+       python3dist(wheel)

+       python3dist(tox-current-env) >= 0.0.6

+       python3dist(setuptools) > 40.0

+       python3dist(wheel) > 2.0

+     - |  # tox 4

+       python3dist(setuptools) >= 40.8

+       python3dist(wheel)

+       python3dist(wheel)

+       python3dist(tox-current-env) >= 0.0.6

+       python3dist(setuptools) > 40.0

+       python3dist(wheel) > 2.0

+       python3dist(tox)

+   result: 0

+ 

  Default build system, unmet deps in requirements file:

    installed:

      setuptools: 50

no initial comment

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

2 new commits added

  • Fix handling of tox 4 provision without tox minversion
  • Communicate loudly that this does not work with old RPM
8 months ago

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

Pull-Request has been merged by churchyard

8 months ago