#405 [F39] Make all the CI spec files build on Fedora 39+
Merged 10 months ago by churchyard. Opened 10 months ago by churchyard.
rpms/ churchyard/pyproject-rpm-macros dnm  into  f39

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

@@ -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

no initial comment

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/f6cf0ada9b484d58b2e8984190f6ce75

LGTM. This is exactly the same as the rawhide PR.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/911af82f38fa4dbe9ec436bddf8df547

Pull-Request has been merged by churchyard

10 months ago