#407 [F37] Make all the CI spec files build on Fedora 39+
Merged 9 months ago by churchyard. Opened 9 months ago by churchyard.
rpms/ churchyard/pyproject-rpm-macros dnm  into  f37

file modified
+4 -1
@@ -14,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.9.0

- Release:        1%{?dist}

+ Release:        2%{?dist}

  

  # Macro files

  Source001:      macros.pyproject
@@ -161,6 +161,9 @@ 

  

  

  %changelog

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

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

+ 

  * Wed May 31 2023 Maxwell G <maxwell@gtmx.me> - 1.9.0-1

  - Allow passing config_settings to the build backend.

  - Resolves: rhbz#2192581

file modified
+2 -2
@@ -59,8 +59,8 @@ 

  

  # build the SRPM in mock

  res=0

- mock --isolation=simple -r $config --enablerepo="$repos" init

- mock --isolation=simple -r $config --enablerepo="$repos" "$@" ~/rpmbuild/SRPMS/${pkgname}-*.src.rpm || res=$?

+ mock --verbose --isolation=simple -r $config --enablerepo="$repos" init

+ mock --verbose --isolation=simple -r $config --enablerepo="$repos" "$@" ~/rpmbuild/SRPMS/${pkgname}-*.src.rpm || res=$?

  

  # move the results to the artifacts directory, so we can examine them

  artifacts=${TEST_ARTIFACTS:-/tmp/artifacts}

file modified
+8 -7
@@ -1,5 +1,5 @@ 

  Name:           python-ipykernel

- Version:        5.2.1

+ Version:        6.11.0

  Release:        0%{?dist}

  Summary:        IPython Kernel for Jupyter

  License:        BSD
@@ -11,6 +11,9 @@ 

  BuildRequires:  pyproject-rpm-macros

  BuildRequires:  python3-devel

  

+ # some of the nested modules import from this, but upstream does not declare the dependency

+ BuildRequires:  python3-ipyparallel

+ 

  %description

  This package contains data files.

  Building this tests that data files are not listed when +auto is not used
@@ -31,11 +34,9 @@ 

  %prep

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

  

- # Add dependency on IPython genutils

- # https://github.com/ipython/ipykernel/pull/756

- # Patch does not apply, so we dirty-sed it in

- sed -i 's/install_requires=\[/install_requires=["ipython_genutils",/' setup.py

- 

+ # Remove the dependency on debugpy.

+ # See https://github.com/ipython/ipykernel/pull/767

+ sed -i '/"debugpy/d' pyproject.toml setup.py

  

  %generate_buildrequires

  %pyproject_buildrequires -r
@@ -48,7 +49,7 @@ 

  %pyproject_save_files 'ipykernel*' +auto

  

  %check

- %pyproject_check_import  -e '*.test*' -e 'ipykernel.gui*' -e 'ipykernel.pylab.backend_inline'

+ %pyproject_check_import  -e '*.test*' -e 'ipykernel.gui*' -e 'ipykernel.pylab.*' -e 'ipykernel.trio*'

  

  %files -n python3-ipykernel -f %{pyproject_files}

  %license COPYING.md

file modified
+7 -4
@@ -9,7 +9,7 @@ 

  URL:                https://github.com/timothycrosley/%{modname}

  Source0:            %{url}/archive/%{version}-2/%{modname}-%{version}-2.tar.gz

  BuildArch:          noarch

- BuildRequires:      python3-devel

+ BuildRequires:      python%{python3_pkgversion}-devel

  BuildRequires:      pyproject-rpm-macros

  

  %description
@@ -17,10 +17,13 @@ 

  Building this tests that executables are not listed when +auto is not used

  with %%pyproject_save_files.

  

- %package -n python3-%{modname}

+ This package also uses %%{python3_pkgversion} in name and has a very limited

+ set of dependencies -- allows to set a different value for it in the CI.

+ 

+ %package -n python%{python3_pkgversion}-%{modname}

  Summary:            %{summary}

  

- %description -n python3-%{modname}

+ %description -n python%{python3_pkgversion}-%{modname}

  %{summary}.

  

  
@@ -50,7 +53,7 @@ 

  grep -F %{_bindir}/%{modname} %{pyproject_files} && exit 1 || true

  

  

- %files -n python3-%{modname} -f %{pyproject_files}

+ %files -n python%{python3_pkgversion}-%{modname} -f %{pyproject_files}

  %doc README.rst *.md

  %license LICENSE

  %{_bindir}/%{modname}

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

  Source0:        %{url}/archive/v%{version}.tar.gz

  

  BuildRequires:  gcc

- BuildRequires:  python3-devel

+ BuildRequires:  python%{python3_pkgversion}-devel

  BuildRequires:  pyproject-rpm-macros

  

  # optional dependency, listed explicitly to have the extension module:

- BuildRequires:  python3-Cython

+ BuildRequires:  python%{python3_pkgversion}-Cython

  

  %description

  This package contains an extension module. Does not contain pyproject.toml.
@@ -22,11 +22,13 @@ 

  - default build backend without pyproject.toml

  Check %%pyproject_check_import basic functionality.

  

+ This package also uses %%{python3_pkgversion} in name and has a very limited

+ set of dependencies -- allows to set a different value for it in the CI.

  

- %package -n python3-mistune

+ %package -n python%{python3_pkgversion}-mistune

  Summary:        %summary

  

- %description -n python3-mistune

+ %description -n python%{python3_pkgversion}-mistune

  %{summary}

  

  
@@ -57,6 +59,6 @@ 

  test -f %{buildroot}%{python3_sitearch}/mistune.cpython-*.so

  

  

- %files -n python3-mistune -f %{pyproject_files}

+ %files -n python%{python3_pkgversion}-mistune -f %{pyproject_files}

  %doc README.rst

  %license LICENSE

@@ -1,5 +1,5 @@ 

  Name:           python-poetry-core

- Version:        1.0.0

+ Version:        1.1.0

  Release:        0%{?dist}

  Summary:        Poetry PEP 517 Build Backend

  

file modified
+4 -2
@@ -1,6 +1,6 @@ 

  %global pypi_name pytest

  Name:           python-%{pypi_name}

- Version:        6.2.5

+ Version:        7.1.3

  Release:        0%{?dist}

  Summary:        Simple powerful testing with Python

  License:        MIT
@@ -40,6 +40,8 @@ 

  # internal check for our macros: insert a subprocess echo to setup.py

  # to ensure it's not generated as BuildRequires

  echo 'import os; os.system("echo if-this-is-generated-the-build-will-fail")' >> setup.py

+ # make this build in EPEL 9

+ sed -i 's/setuptools-scm\[toml\]>=6.2.3/setuptools-scm[toml]>=5/' pyproject.toml

  

  

  %generate_buildrequires
@@ -59,7 +61,7 @@ 

  %if %{with tests}

  # Only run one test (which uses a test-only dependency, hypothesis)

  # See how to pass options trough the macro to tox, trough tox to pytest

- %tox -- -- -k metafunc

+ %tox -- -- -k "metafunc and not test_parametrize_" -Wdefault

  %else

  %pyproject_check_import

  %endif

file modified
+5 -5
@@ -1,8 +1,8 @@ 

  Name:           python-setuptools

  # on the CI we test different version of setuptools on different Fedora versions

  # don't package software like this in Fedora please

- %if 0%{?fedora} >= 37 || 0%{?rhel} >= 10

- Version:        65.5.1

+ %if 0%{?fedora} || 0%{?rhel} >= 10

+ Version:        67.7.2

  %else

  Version:        59.6.0

  %endif
@@ -14,8 +14,8 @@ 

  Source:         %{pypi_source setuptools %{version}}

  

  # Patch from Fedora proper

- %if 0%{?fedora} >= 37 || 0%{?rhel} >= 10

- Patch:          https://src.fedoraproject.org/rpms/python-setuptools/raw/b61d86b9659/f/Remove-optional-or-unpackaged-test-deps.patch

+ %if 0%{?fedora} || 0%{?rhel} >= 10

+ Patch:          https://src.fedoraproject.org/rpms/python-setuptools/raw/8ae9b2a777c/f/Remove-optional-or-unpackaged-test-deps.patch

  %else

  Patch:          https://src.fedoraproject.org/rpms/python-setuptools/raw/6fc093d6b3d/f/0001-Remove-optional-or-unpackaged-test-deps.patch

  %endif
@@ -54,7 +54,7 @@ 

  %prep

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

  

- %if 0%{?fedora} < 37 && 0%{?rhel} < 10

+ %if 0%{?rhel} && 0%{?rhel} < 10

  # The following test deps are optional and either not desired or not available in Fedora:

  sed -Ei setup.cfg -e  '/\bpytest-(checkdocs|black|cov|mypy|enabler)\b/d' \

                    -e  '/\bflake8\b/d' \

@@ -58,7 +58,7 @@ 

  %check

  # This tox should run all the toxenvs specified via -e in %%pyproject_buildrequires

  # We only run some of the tests (running all of them requires network connection and is slow)

- %tox -- -- -k test_version | tee toxlog

+ %tox -- -- -k test_version -Wdefault | tee toxlog

  

  # Internal check for our macros: Assert both toxenvs were executed.

  grep -E 'py%{python3_version_nodots}-test: (OK|commands succeeded)' toxlog

@@ -35,6 +35,10 @@ 

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

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

      pyproject.toml

+ # Hacky backport of https://src.fedoraproject.org/rpms/python-virtualenv/c/87b1f95664

+ %if 0%{?fedora} >= 39 || 0%{?rhel} >= 10

+ sed -i 's/_nonwrappers/_hookimpls/' tests/conftest.py

+ %endif

  

  

  %generate_buildrequires