From c009436ddd4b9a16dcf667cea7a95644db372bda Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Jul 31 2023 19:16:59 +0000 Subject: Update example using python3_version_nodots This is not defined until `python3-devel` is installed, so it has to be conditionally evaluated just like the previous `python3_version` example. ALso note that the comparison using `python3_version` does not work on EPEL 9 as well, and `python3_version_nodots` is required. Signed-off-by: Michel Alexandre Salim --- diff --git a/guidelines/modules/ROOT/pages/Python.adoc b/guidelines/modules/ROOT/pages/Python.adoc index 888f42b..bd19d47 100644 --- a/guidelines/modules/ROOT/pages/Python.adoc +++ b/guidelines/modules/ROOT/pages/Python.adoc @@ -1815,17 +1815,17 @@ similar to the Python string prefixes: [NOTE] ==== -As a workaround for compatibility with RPM releases before 4.16 (Fedora 33), +As a workaround for compatibility with RPM releases up to 4.16 (EPEL 9), `+%{python3_version_nodots}+` can be compared as an integers: [source,spec] ---- -%if %{python3_version_nodots} > 38 +%if 0%{?python3_version_nodots} > 38 ... %endif ---- -This will work with Python 3.10 (310 > 39), +This will work with Python 3.10 (310 > 38), but eventually break with Python 4.0 (40 < 310). ====