Define %python2 and %python3
See https://pagure.io/packaging-committee/issue/907 Redefine %__pythonX to change the behavior of %pythonX, %pythonX_version, etc. Use %pythonX in spec.
This commit is contained in:
parent
f09ccd21f5
commit
af35bb0ac9
@ -2,9 +2,15 @@
|
|||||||
# - they can be used in Build/Requires
|
# - they can be used in Build/Requires
|
||||||
# - they can be used in non-Python packages where requiring pythonX-devel would
|
# - they can be used in non-Python packages where requiring pythonX-devel would
|
||||||
# be an overkill
|
# be an overkill
|
||||||
|
|
||||||
|
# use the underscored macros to redefine the behavior of %%python3_version etc.
|
||||||
%__python2 /usr/bin/python2
|
%__python2 /usr/bin/python2
|
||||||
%__python3 /usr/bin/python3
|
%__python3 /usr/bin/python3
|
||||||
|
|
||||||
|
# use the non-underscored macros to refer to Python in spec, etc.
|
||||||
|
%python2 %__python2
|
||||||
|
%python3 %__python3
|
||||||
|
|
||||||
# For backwards compatibility only
|
# For backwards compatibility only
|
||||||
# See the comments in https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/22
|
# See the comments in https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/22
|
||||||
%__python /usr/bin/python
|
%__python /usr/bin/python
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: python-rpm-macros
|
Name: python-rpm-macros
|
||||||
Version: 3
|
Version: 3
|
||||||
Release: 48%{?dist}
|
Release: 49%{?dist}
|
||||||
Summary: The unversioned Python RPM macros
|
Summary: The unversioned Python RPM macros
|
||||||
|
|
||||||
# macros: MIT, compileall2.py: PSFv2
|
# macros: MIT, compileall2.py: PSFv2
|
||||||
@ -78,6 +78,9 @@ install -m 644 %{SOURCE5} \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 27 2019 Miro Hrončok <mhroncok@redhat.com> - 3-49
|
||||||
|
- Define %%python2 and %%python3
|
||||||
|
|
||||||
* Mon Aug 26 2019 Miro Hrončok <mhroncok@redhat.com> - 3-48
|
* Mon Aug 26 2019 Miro Hrončok <mhroncok@redhat.com> - 3-48
|
||||||
- Drop --strip-file-prefix option from %%pyX_install_wheel macros, it is not needed
|
- Drop --strip-file-prefix option from %%pyX_install_wheel macros, it is not needed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user