From 5919708f6c5c2e9528e9f8f6ac8efd0f7a85b224 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: May 21 2020 15:39:01 +0000 Subject: https://fedoraproject.org/wiki/Changes/Python3.9 Also switch to PEP 503 based %py_dist_name (see rhbz#1791530) --- diff --git a/macros.python-srpm b/macros.python-srpm index 45f4fca..15a7193 100644 --- a/macros.python-srpm +++ b/macros.python-srpm @@ -38,15 +38,15 @@ # Python spec files use the version defined here to determine defaults for the # %%py_provides and %%python_provide macros, as well as for the "pythonname" generator that # provides python3-foo for python3.XX-foo and vice versa for the default "main" version. -# E.g. in Fedora 32, python3.8-foo will provide python3-foo, -# python3-foo will provide python3.8-foo. +# E.g. in Fedora 33, python3.9-foo will provide python3-foo, +# python3-foo will provide python3.9-foo. # # There are two macros: # # This always contains the major.minor version (with dots), default for %%python3_version. -%__default_python3_version 3.8 +%__default_python3_version 3.9 # -# The pkgname version that determines the alternative provide name (e.g. python3.8-foo), +# The pkgname version that determines the alternative provide name (e.g. python3.9-foo), # set to the same as above, but historically hasn't included the dot. # This is left intentionally a separate macro, in case the naming convention ever changes. %__default_python3_pkgversion %__default_python3_version @@ -70,7 +70,7 @@ # Converts Python dist name to a canonical format %py_dist_name() %{lua:\ name = rpm.expand("%{?1:%{1}}");\ - canonical = string.gsub(string.lower(name), "[^%w%.]+", "-");\ + canonical = string.gsub(string.lower(name), "%W+", "-");\ print(canonical);\ } diff --git a/python-rpm-macros.spec b/python-rpm-macros.spec index fec0a6c..95cd352 100644 --- a/python-rpm-macros.spec +++ b/python-rpm-macros.spec @@ -1,6 +1,6 @@ Name: python-rpm-macros -Version: 3.8 -Release: 8%{?dist} +Version: 3.9 +Release: 1%{?dist} Summary: The common Python RPM macros # macros and lua: MIT, compileall2.py: PSFv2 @@ -107,6 +107,10 @@ install -m 644 compileall2.py %{buildroot}%{_rpmconfigdir}/redhat/ %changelog +* Thu May 21 2020 Miro Hrončok - 3.9-1 +- https://fedoraproject.org/wiki/Changes/Python3.9 +- Switch the %%py_dist_name macro to convert dots (".") into dashes as defined in PEP 503 (#1791530) + * Mon May 11 2020 Miro Hrončok - 3.8-8 - Implement %%pytest - Implement %%pyX_shebang_fix