From e8933acb121b684c6972ab0b59ac78da9cf542ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 1 Jun 2023 09:26:42 +0200 Subject: [PATCH] CI: Run a couple of Python 3.11 builds (RHEL 9 specific) Related: rhbz#2208971 --- tests/python-isort.spec | 11 +++++++---- tests/python-mistune.spec | 12 +++++++----- tests/tests.yml | 6 ++++++ 3 files changed, 20 insertions(+), 9 deletions(-) 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 diff --git a/tests/tests.yml b/tests/tests.yml index 003d123..783b903 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -101,6 +101,12 @@ - config-settings-test: dir: . run: ./mocktest.sh config-settings-test + - isort_311: + dir: . + run: ./mocktest.sh python-isort --define 'python3_pkgversion 3.11' + - mistune_311: + dir: . + run: ./mocktest.sh python-mistune --define 'python3_pkgversion 3.11' required_packages: - 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm' - 'https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm'