Also switch to PEP 503 based %py_dist_name (see rhbz#1791530)
This commit is contained in:
parent
72371929c5
commit
5919708f6c
@ -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);\
|
||||
}
|
||||
|
||||
|
@ -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 <mhroncok@redhat.com> - 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 <mhroncok@redhat.com> - 3.8-8
|
||||
- Implement %%pytest
|
||||
- Implement %%pyX_shebang_fix
|
||||
|
Loading…
Reference in New Issue
Block a user