From 4f16920edb60f56459704cf268479286eb5fdd05 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jun 15 2023 17:03:54 +0000 Subject: CI: Adjust a couple of specs to allow Python 3.11 builds on RHEL 9 This allows running CI tests as: ./mocktest.sh python-isort --define 'python3_pkgversion 3.11' Which only makes sense in RHEL, and hence is not done here. The purpose of this change in Fedora is to make the test spec files identical to c9s, for easier future synchronization. Related c9s commit: https://gitlab.com/redhat/centos-stream/rpms/pyproject-rpm-macros/-/commit/e8933acb121b684c6972ab0b59ac78da9cf542ed --- diff --git a/tests/python-isort.spec b/tests/python-isort.spec index 069e3d3..cde9156 100644 --- a/tests/python-isort.spec +++ b/tests/python-isort.spec @@ -9,7 +9,7 @@ License: MIT 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 @@ This package contains executables. 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 @@ test -d %{buildroot}%{python3_sitelib}/%{modname}-%{version}.dist-info/ 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} diff --git a/tests/python-mistune.spec b/tests/python-mistune.spec index a187c7c..dfbf26f 100644 --- a/tests/python-mistune.spec +++ b/tests/python-mistune.spec @@ -8,11 +8,11 @@ URL: https://github.com/lepture/mistune 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 @@ Building this tests: - 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.py 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