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
0fa5a2d811
commit
dee3401a7e
3 changed files with 15 additions and 1 deletions
|
|
@ -1,4 +1,9 @@
|
|||
# use the underscored macros to redefine the behavior of %%python2_version etc.
|
||||
%__python2 /usr/bin/python2.6
|
||||
|
||||
# use the non-underscored macros to refer to Python in spec, etc.
|
||||
%python2 %__python2
|
||||
|
||||
%python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
%python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||
%python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue