{__python2} for el6?
Ralph Bean
rbean at redhat.com
Wed Dec 4 19:41:30 UTC 2013
Back in August, the {__python} macro was deprecated in favor of
{__python2}. This is cool as it paves the way for an eventual python3
takeover.
https://fedoraproject.org/w/index.php?title=Packaging:Python&diff=350838&oldid=350837
However, {__python} is still the expected macro for el6 builds. Many of us
maintain single spec files that we build for Fedora and EPEL.
- Does anyone have any recommendations about how to handle this?
I recently started using this blurb at the top of my new spec files.
Will it do?
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 %{__python}}
%{!?python2_sitelib: %global python2_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
- If we decide on a canonical approach, can it be added to the Python
guidelines as a recommendation?
Cheers-
-Ralph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/python-devel/attachments/20131204/19d9e340/attachment.sig>
More information about the python-devel
mailing list