----- Original Message -----
On Thu, Aug 06, 2015 at 10:03:00AM -0400, Robert Kuska wrote:
> ----- Original Message -----
> > From: "Jason L Tibbitts III" <tibbs(a)math.uh.edu>
> > To: devel-announce(a)lists.fedoraproject.org
> > Sent: Tuesday, August 4, 2015 11:34:06 PM
> > Subject: [Guidelines change] Changes to the packaging guidelines
> >
> > Here are the recent changes to the packaging guidelines.
> >
> > -----
> >
> > The big change is that the Python guidelines have been extensively
> > reorganized and partially rewritten, and new macros are available which
> > simplify packaging by removing some of the boilerplate which was
> > previously required.
> >
> > The main guideline page has been slimmed down to show the more basic
> > info and a clean and simple spec using the new macros which is free of
> > multiline conditionals.
> >
> > boilerplate previously associated with python packages. Some of the
> > more esoteric information has been moved to an appendix page to keep the
> > main page of reasonable size.
> >
> > The new guidelines are currently only functional on Fedora 22 and newer
> > releases, but are currently in updates-testing for Fedora 21 and EPEL7.
> > The older guidelines are preserved in a separate page and we'll try to
> > keep them updated with new requirements.
> >
> > The new guidelines page:
> > *
https://fedoraproject.org/wiki/Packaging:Python
>
> Sorry for late reply.
>
> From the Python packaging:
>
> # Must do the python2 install first because the scripts in /usr/bin are
> # overwritten with every setup.py install, and in general we want the
> # python3 version to be the default.
> %py2_install
> %py3_install
>
> I don't think that binaries of python module should be already switched to
> the state that non versioned binary is python3 binary.
This problem is covered extensively in the guidelines:
If the executables provide the same functionality independent of
whether they are run on top of Python 2 or Python 3, then only one
version of the executable should be packaged. On releases up to and
including F21, this was the python 2 implementation. Python3 should
be used in F22 and later if supported by upstream. [...]
Transitioning from python2 to python3 is left to individual package
maintainers[...]
The switch as "default" was accepted as
https://fedoraproject.org/wiki/Changes/Python_3_as_Default.
> While /usr/bin/python points to /usr/bin/python2 and python-foo provides
> python2 version
> of the foo package I would expect binary foo to run on python2.
Fedora is finally switching to Python 3. E.g. /usr/bin/dnf now uses Python 3,
and a lot of other things also.
I'm not sure I understand what you're saying 100 %, so let's make this clear:
1. If the package ships a binary that does the same regardless of Python version used to
invoke it, then /usr/bin/foo should be invoked with Python 3. This usually applies to
"applications", like dnf.
2. If the package ships a binary that does different things on different Python versions,
then the unversioned binary should point to Python 2 version. This is done in order to
stay in line with "/usr/bin/python" pointing to Python 2. This usually applies
to e.g. test runners, coverage tools, etc.
> This applies for modules binaries such as pytest (nosetests,
pip, ...)
> where is
> difference between running python2 and python3 version of the binary.
For those cases guidelines say that both versions should be packaged.
> Currently we should have non versioned binaries to run on python3 only for
> python
> applications (devassistant) where both python2 and python3 version of the
> application
> provide same functionality.
Yes.
> Therefore I suggest to switch order of pyX_install macros.
Eeee, no. Let's use Python 3 by default.
Yes. Because the example in the guidelines is an example of packaging a Python library
(point 2. above), hence the unversioned binary should still use Python 2. Even the
guidelines say that:
" For example, the python3 version of "coverage" must ship executables
/usr/bin/coverage-3 and /usr/bin/coverage-3.4 (assuming python3 is currently version 3.4),
while the python2 version must provide /usr/bin/coverage, /usr/bin/coverage-2 and
/usr/bin/coverage-2.7 (assuming python2 version 2.7). "
Zbyszek
--
Regards,
Slavek Kabrda