[Fedora-packaging] Python 3 compatibility update to Python guidelines
David Malcolm
dmalcolm at redhat.com
Thu Oct 29 22:35:04 UTC 2009
On Sat, 2009-10-17 at 10:36 -0400, David Malcolm wrote:
> On Sat, 2009-10-17 at 13:33 +0300, Ville Skyttä wrote:
> > https://fedoraproject.org/wiki/Packaging:Python
> >
> > %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
> > distutils.sysconfig import get_python_lib; print get_python_lib()")}
> >
> > %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from
> > distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
> >
> >
> > These no longer work with Python 3 due to "print" changes. They should be
> > replaced with something like these that work with both Python 2 and 3 (already
> > done in spectemplate-python.spec in rpmdevtools git):
> >
> > %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
> > distutils.sysconfig import *; import sys;
> > sys.stdout.write(get_python_lib())")}
> >
> > %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from
> > distutils.sysconfig import *; import sys;
> > sys.stdout.write(get_python_lib(1))")}
>
[snip]
> Your proposed change does ease migration, so a cautious "+1" from me.
[snip]
Did the change to the guidelines happen, and did the rpmdevtools
template get updated?
More information about the Fedora-packaging
mailing list