From 374d223f0aad7301485926c8425e1ffa27b85209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 29 Jan 2025 16:18:26 +0100 Subject: [PATCH] Conditionalize the Recommended Python versions based on Fedora version See https://fedoraproject.org/wiki/Changes/RetirePython3.8 Eventually, we will get rid of this section and only use Supplements. Also update the CI config to make 3.8 optional. [skip changelog] --- python-tox.spec | 4 ++++ tests/tests.yml | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/python-tox.spec b/python-tox.spec index ca7ac85..4f35d51 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -81,10 +81,14 @@ Summary: %{summary} # however it launches other Python versions as subprocesses. # It recommends all Python versions it supports. (This is an exception to # the rule that Fedora packages may not require the alternative interpreters.) +%if 0%{?fedora} +%if 0%{?fedora} < 42 Recommends: python3.8 +%endif Recommends: python3.9 Recommends: python3.10 Recommends: pypy3-devel +%endif Recommends: python3-devel # Instead of adding new Pythons here, add `Supplements: tox` to them, see: # https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/NVVUXSVSPFQOWIGBE2JNI67HEO7R63ZQ/ diff --git a/tests/tests.yml b/tests/tests.yml index 5822cbf..c655dda 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -36,9 +36,9 @@ - smoke36: dir: python/smoke run: VERSION=3.6 TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh - - smoke38: + - smoke38_optional: dir: python/smoke - run: VERSION=3.8 ./venv.sh + run: VERSION=3.8 INSTALL_OR_SKIP=true ./venv.sh - smoke39: dir: python/smoke run: VERSION=3.9 ./venv.sh @@ -76,7 +76,6 @@ - gcc - virtualenv - python3.6 - - python3.8 - python3.9 - python3.10-devel - python3.11-devel