#403 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  rawhide

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

6 packages on the CI fail with exit code 1 or 10:

exit code 1

  • python-pytest.spec
  • python-setuptools_scm.spec
  • python-ipykernel.spec
  • python-virtualenv.spec

exit code 10

  • python-poetry-core.spec
  • python-setuptools.spec

I believe exit code 10 are missing dependencies and exit code 1 are build failures, but I might be wrong. With the currently broken CI, we don't see the actual mock logs.

With the currently broken CI, we don't see the actual mock logs.

Try mock --verbose or unbuffer mock.

rebased onto bd1022e

9 months ago

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/eb011e282543468795d42470a9c4c2c7

1 new commit added

  • CI: Make pytest build on Fedora 37 to 39 as well as EPEL 9
9 months ago

1 new commit added

  • CI: Apply a FTBFS fix from Fedora 39 to the virtualenv spec
9 months ago

1 new commit added

  • CI: Update ipykernel to a version that no longer uses the imp module
9 months ago

1 new commit added

  • CI: Update poetry-core to workaround a weird FTBFS on Fedora 39+
9 months ago

1 new commit added

  • CI: Update setuptools to make it build with Python 3.12
9 months ago

1 new commit added

  • CI: Don't treat DeprecationWarnings in setuptools_scm's %check as errors
9 months ago

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

:white_check_mark:

I went through each commit individually, and they look good to me. I'm not sure if you want to remove the mock --verbose change now that the testing infra is fixed. Thanks!


  • [x] PR solves the issue it claims to address (updates the package, solves a bug, etc.)
  • [x] Resulting RPM package is installable on the destination Fedora release
  • [x] No dependent RPM packages will stop being installable when the PR is merged and built
  • [x] PR is tested sufficiently and the test results are OK (green CI, impact check issues addressed)
  • [x] PR is open against all relevant Fedora releases
  • [x] (If PR is open against more Fedora releases) branches don't diverge unnecessarily
  • [x] (If PR is open against older Fedora releases) PR doesn't contain backwards incompatible changes
  • [x] Each commit's scope is sane (there are no irrelevant changes combined together)
  • [x] Each commit message is relevant
  • [-] (If it's linked), the right (problem, product) BZ ticket is referenced
  • [-] (If it's linked), BZ ticket reference is in the correct format in %changelog and/or commit message
  • [-] (If needed) Release is bumped
  • [-] (When adding patches) Patch purpose is documented in the specfile
  • [-] (When backporting patches) Patch origin and/or authorship is traceable
  • [-] (When creating patches from scratch) The patch is proposed upstream or justified as downstream-only

Thanks!

I want to keep mock --verbose for cases when the CI will be broken again. The failure reason is now likely more accessible for others when it happens.

Pull-Request has been merged by churchyard

9 months ago