#392 [F38] Make %pyproject_build_lib work with RPM 4.16
Merged a year ago by churchyard. Opened a year ago by churchyard.
rpms/ churchyard/pyproject-rpm-macros rpm4.16  into  f38

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

  or $PWD/build/lib.%%{python3_platform}-cpython-%%{python3_version_nodots} for packages with extension modules.

  Other build backends and older distributions may need different paths.

  See https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/HMLOPAU3RZLXD4BOJHTIPKI3I4U6U7OE/ for details.

- }%{global __pyproject_build_lib_warned 1}}%{expand:\\\

+ }%global __pyproject_build_lib_warned 1}%{expand:\\\

  $(

  pyproject_build_lib=()

  if [ -d build/lib.%{python3_platform}-cpython-%{python3_version_nodots} ]; then

file modified
+21 -4
@@ -2,7 +2,10 @@ 

  Summary:        RPM macros for PEP 517 Python packages

  License:        MIT

  

- %bcond_without tests

+ %bcond tests 1

+ # pytest-xdist and tox are not desired in RHEL

+ %bcond pytest_xdist %{undefined rhel}

+ %bcond tox_tests %{undefined rhel}

  

  # The idea is to follow the spirit of semver

  # Given version X.Y.Z:
@@ -11,7 +14,7 @@ 

  #   Increment Z when this is a bugfix or a cosmetic change

  # Dropping support for EOL Fedoras is *not* considered a breaking change

  Version:        1.8.0

- Release:        1%{?dist}

+ Release:        2%{?dist}

  

  # Macro files

  Source001:      macros.pyproject
@@ -47,12 +50,16 @@ 

  

  %if %{with tests}

  BuildRequires:  python3dist(pytest)

+ %if %{with pytest_xdist}

  BuildRequires:  python3dist(pytest-xdist)

+ %endif

  BuildRequires:  python3dist(pyyaml)

  BuildRequires:  python3dist(packaging)

  BuildRequires:  python3dist(pip)

  BuildRequires:  python3dist(setuptools)

+ %if %{with tox_tests}

  BuildRequires:  python3dist(tox-current-env) >= 0.0.6

+ %endif

  BuildRequires:  python3dist(wheel)

  BuildRequires:  (python3dist(toml) if python3-devel < 3.11)

  %endif
@@ -118,10 +125,17 @@ 

  install -pm 644 pyproject_requirements_txt.py %{buildroot}%{_rpmconfigdir}/redhat/

  install -pm 644 pyproject_wheel.py %{buildroot}%{_rpmconfigdir}/redhat/

  

- %if %{with tests}

  %check

+ # assert the two signatures of %%pyproject_buildrequires match exactly

+ signature1="$(grep '^%%pyproject_buildrequires' macros.pyproject | cut -d' ' -f1)"

+ signature2="$(grep '^%%pyproject_buildrequires' macros.aaa-pyproject-srpm | cut -d' ' -f1)"

+ test "$signature1" == "$signature2"

+ # but also assert we are not comparing empty strings

+ test "$signature1" != ""

+ 

+ %if %{with tests}

  export HOSTNAME="rpmbuild"  # to speedup tox in network-less mock, see rhbz#1856356

- %pytest -vv --doctest-modules -n auto

+ %pytest -vv --doctest-modules %{?with_pytest_xdist:-n auto} %{!?with_tox_tests:-k "not tox"}

  

  # brp-compress is provided as an argument to get the right directory macro expansion

  %{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress
@@ -147,6 +161,9 @@ 

  

  

  %changelog

+ * Tue May 23 2023 Miro Hrončok <mhroncok@redhat.com> - 1.8.0-2

+ - Rebuilt for ELN dependency changes

+ 

  * Thu Apr 27 2023 Miro Hrončok <mhroncok@redhat.com> - 1.8.0-1

  - %%pyproject_buildrequires: Add support for self-referential extras requirements

    Fixes: rhbz#2171343

@@ -389,7 +389,7 @@ 

    result: 0

    stderr_contains: "Reading metadata from {wheeldir}/pytest-6.6.6-py3-none-any.whl"

  

- Tox dependencies:

+ tox dependencies:

    installed:

      setuptools: 50

      wheel: 1
@@ -433,7 +433,7 @@ 

        python3dist(inst)

    result: 0

  

- Tox extras:

+ tox extras:

    installed:

      setuptools: 50

      wheel: 1
@@ -497,7 +497,7 @@ 

        python3dist(extra-dep[extra_dep])

    result: 0

  

- Tox provision unsatisfied:

+ tox provision unsatisfied:

    installed:

      setuptools: 50

      wheel: 1
@@ -542,7 +542,7 @@ 

        python3dist(tox) >= 3.999

    result: 0

  

- Tox provision satisfied:

+ tox provision satisfied:

    installed:

      setuptools: 50

      wheel: 1

file modified
+8 -6
@@ -28,26 +28,28 @@ 

  

  %prep

  %autosetup -p1 -n virtualenv-%{version}

- # Relax the upper bounds of some dependencies to their known available versions in Fedora 36

- # This can be reduced once Fedora 36 goes EOL, but might still be partially needed on Fedora 37

- sed -i -e 's/distlib<1,>=0.3.6/distlib<1,>=0.3.4/' \

+ # Relax the upper bounds of some dependencies to their known available versions in EL 9

+ sed -i -e 's/distlib<1,>=0.3.6/distlib<1,>=0.3.2/' \

         -e 's/filelock<4,>=3.4.1/filelock<4,>=3.3.1/' \

         -e 's/platformdirs<4,>=2.4/platformdirs<4,>=2.3/' \

+        -e 's/hatchling>=1.12.2/hatchling>=0.25/' \

+        -e 's/hatch-vcs>=0.3/hatch-vcs>=0.2.1/' \

      pyproject.toml

  

  

  %generate_buildrequires

- %pyproject_buildrequires

+ %pyproject_buildrequires -w

  

  

  %build

- %pyproject_wheel

+ # %%pyproject_buildrequires -w makes this redundant

+ # %%pyproject_wheel

  

  

  %install

  %pyproject_install

  %pyproject_save_files virtualenv

- %{?fc36:

+ %{?el9:

  # old version of setuptools_scm produces files incompatible with

  # assumptions in virtualenv code, we append the expected attributes:

  echo '__version__, __version_tuple__ = version, version_tuple' >> %{buildroot}%{python3_sitelib}/virtualenv/version.py

no initial comment

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

1 new commit added

  • CI: Make python-virtualenv.spec EL9-compatible
a year ago

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

7 new commits added

  • CI: Make python-virtualenv.spec EL9-compatible
  • Make %pyproject_build_lib work with RPM 4.16
  • Bump the release for ELN dependency changes
  • Don't run tox tests on RHEL by default, as tox is unwanted in RHEL
  • Use lowercase tox in test case names, as upstream wants it
  • don't use pytest-xdist in RHEL
  • In %check, assert the two signatures of %pyproject_buildrequires match exactly
a year ago

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

Pull-Request has been merged by churchyard

a year ago