Move %python3_pkgversion definition earlier in the file
So we can use it later in %__python3 and maintain readability.
This commit is contained in:
parent
9eae0ccaf1
commit
b55e6151bd
@ -1,22 +1,3 @@
|
|||||||
# Define the Python interpreter paths in the SRPM macros so that
|
|
||||||
# - they can be used in Build/Requires
|
|
||||||
# - they can be used in non-Python packages where requiring pythonX-devel would
|
|
||||||
# be an overkill
|
|
||||||
|
|
||||||
# use the underscored macros to redefine the behavior of %%python3_version etc.
|
|
||||||
%__python2 /usr/bin/python2
|
|
||||||
%__python3 /usr/bin/python3
|
|
||||||
|
|
||||||
# use the non-underscored macros to refer to Python in spec, etc.
|
|
||||||
%python2 %__python2
|
|
||||||
%python3 %__python3
|
|
||||||
|
|
||||||
# See https://fedoraproject.org/wiki/Changes/PythonMacroError
|
|
||||||
%__python %{error:attempt to use unversioned python, define %%__python to %{__python2} or %{__python3} explicitly}
|
|
||||||
|
|
||||||
# Users can use %%python only if they redefined %%__python (e.g. to %%__python3)
|
|
||||||
%python %__python
|
|
||||||
|
|
||||||
# There are multiple Python 3 versions packaged, but only one can be the "main" version
|
# There are multiple Python 3 versions packaged, but only one can be the "main" version
|
||||||
# That means that it owns the "python3" namespace:
|
# That means that it owns the "python3" namespace:
|
||||||
# - python3 package name
|
# - python3 package name
|
||||||
@ -49,6 +30,25 @@
|
|||||||
# Alternatively, it can be overridden in spec (e.g. to "3.8") when building for alternate Python stacks.
|
# Alternatively, it can be overridden in spec (e.g. to "3.8") when building for alternate Python stacks.
|
||||||
%python3_pkgversion 3
|
%python3_pkgversion 3
|
||||||
|
|
||||||
|
# Define the Python interpreter paths in the SRPM macros so that
|
||||||
|
# - they can be used in Build/Requires
|
||||||
|
# - they can be used in non-Python packages where requiring pythonX-devel would
|
||||||
|
# be an overkill
|
||||||
|
|
||||||
|
# use the underscored macros to redefine the behavior of %%python3_version etc.
|
||||||
|
%__python2 /usr/bin/python2
|
||||||
|
%__python3 /usr/bin/python3
|
||||||
|
|
||||||
|
# use the non-underscored macros to refer to Python in spec, etc.
|
||||||
|
%python2 %__python2
|
||||||
|
%python3 %__python3
|
||||||
|
|
||||||
|
# See https://fedoraproject.org/wiki/Changes/PythonMacroError
|
||||||
|
%__python %{error:attempt to use unversioned python, define %%__python to %{__python2} or %{__python3} explicitly}
|
||||||
|
|
||||||
|
# Users can use %%python only if they redefined %%__python (e.g. to %%__python3)
|
||||||
|
%python %__python
|
||||||
|
|
||||||
# Define where Python wheels will be stored and the prefix of -wheel packages
|
# Define where Python wheels will be stored and the prefix of -wheel packages
|
||||||
# - In Fedora we want wheel subpackages named e.g. `python-pip-wheel` that
|
# - In Fedora we want wheel subpackages named e.g. `python-pip-wheel` that
|
||||||
# install packages into `/usr/share/python-wheels`. Both names are not
|
# install packages into `/usr/share/python-wheels`. Both names are not
|
||||||
|
Loading…
Reference in New Issue
Block a user