Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1464090 - python-exabgp: Provide a Python 3 subpackage
Summary: python-exabgp: Provide a Python 3 subpackage
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-exabgp
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3
TreeView+ depends on / blocked
 
Reported: 2017-06-22 12:14 UTC by Iryna Shcherbina
Modified: 2018-12-28 12:09 UTC (History)
2 users (show)

Fixed In Version: python-exabgp-4.0.10-1.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-28 12:09:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Iryna Shcherbina 2017-06-22 12:14:34 UTC
Upstream, this software supports Python 3 [0]. Please provide a Python 3
package for Fedora.


According to the Python packaging guidelines [1], software must be
packaged for Python 3 if upstream supports it.
The guidelines give detailed information on how to do this, and even
provide an example spec file [2].

The current best practice is to provide subpackages for the two Python
versions (called "Common SRPM" in the guidelines). Alternatively, if
nothing depends on your Python2 package, you can just switch to Python 3
entirely.

It's OK to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 26 as well.


If you need more instructions, a guide for porting Python-based RPMs is
available at [3].
If anything is unclear, or if you need any kind of assistance with the
porting, you can ask on IRC (#fedora-python on Freenode), or reply here.
We'll be happy to help!


[0] https://github.com/Exa-Networks/exabgp/releases/tag/4.0.0
[1] https://fedoraproject.org/wiki/Packaging:Python
[2] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file
[3] http://python-rpm-porting.readthedocs.io/

Comment 1 Luke Hinds 2017-06-22 12:37:11 UTC
Thanks Iryna, will start on this early next week, which will coincide with the next upstream release due.

Comment 2 Luke Hinds 2017-06-26 13:17:23 UTC
Spec URL: https://raw.githubusercontent.com/lukehinds/ExaBGP-Packaging/master/python-exabgp.spec
SRPM URL: https://github.com/lukehinds/ExaBGP-Packaging/raw/master/python-exabgp-4.0.1-1.fc25.src.rpm

Hi Iryna,

Putting the spec / srpm so i can run fedora-review.

The above works ok with mock, but koji is failing: https://koji.fedoraproject.org/koji/taskinfo?taskID=20183757

I am quite sure the spec breaks the DRY principle a fair amount, but could not work out how to share areas of %file operations between both 2&3.

If you have any feedback, please do let me know.

Comment 3 Luke Hinds 2017-07-06 17:48:31 UTC
This has been completed now:
https://apps.fedoraproject.org/packages/python-exabgp

Comment 4 Iryna Shcherbina 2017-07-18 09:46:44 UTC
Hi Luke,

thanks for adding a Python 3 subpackage.

I would like to point out that although you have added a %check section you are not running any tests. As far as I see, upstream runs tests with the following commands [0]:

> nosetests-2 ./qa/tests/*_test.py
> nosetests-3 ./qa/tests/*_test.py

So you may add a build dependency on python2/3-nose and run them as well.

[0] https://github.com/Exa-Networks/exabgp/blob/master/.travis.yml#L26

Comment 5 Jan Kurik 2017-08-15 08:26:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 6 Iryna Shcherbina 2018-02-02 21:47:21 UTC
Hi Luke,

Since the last update, exabgp main RPM started to depend on Python 2. Is it intended? Can it be switched to Py3?

Comment 7 Luke Hinds 2018-02-05 10:30:14 UTC
Hi Iryna,

My last two changes were to increase to version 4.0.5 and move the %endif to after the '%description -n exabgp' [0] 

Is it possible the above would flip the py3 dependence?


[0] https://src.fedoraproject.org/rpms/python-exabgp/blob/254abecdbe27ccc12d37fd5adbfd212d0b83922a/f/python-exabgp.spec#_47

Comment 8 Iryna Shcherbina 2018-02-05 17:15:06 UTC
(In reply to Luke Hinds from comment #7)
> My last two changes were to increase to version 4.0.5 and move the %endif to
> after the '%description -n exabgp' [0] 
> 
> Is it possible the above would flip the py3 dependence?


No, it was not due to this change. It is because the main exabgp RPM contains a bunch of Python scripts with #!/usr/bin/python2 (or #!/usr/bin/env python) shebangs:

$ grep -r /usr/bin/python2
usr/share/exabgp/processes/api-announcement.run:#!/usr/bin/python2
usr/share/exabgp/processes/api-eor.run:#!/usr/bin/python2
usr/share/exabgp/processes/stderr-1.py:#!/usr/bin/python2
(.. a lot more..)


This generates the dependency on /usr/bin/python2.

The spec file contains a line saying that Python 3 is not default for exabgp [0]. Is something not supported in the Python 3 version of exabgp, or is there any package that needs exabgp to run on Python 2? I am just trying to understand   why exabgp cannot be switched to Py3 completely. 


[0] https://src.fedoraproject.org/rpms/python-exabgp/blob/master/f/python-exabgp.spec#_123

Comment 9 Ben Cotton 2018-11-27 17:12:38 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Ben Cotton 2018-11-30 19:38:10 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 11 Miro Hrončok 2018-11-30 20:10:37 UTC
"The spec file contains a line saying that Python 3 is not default for exabgp [0]. Is something not supported in the Python 3 version of exabgp, or is there any package that needs exabgp to run on Python 2? I am just trying to understand   why exabgp cannot be switched to Py3 completely. "

This is still true.

Comment 12 Luke Hinds 2018-12-28 11:00:31 UTC
One the latest release all shebangs to python 2 have been removed

$ git checkout 4.0.10 

$ grep -r /usr/bin/python2                                                                              
redhat/python-exabgp.spec.git:%{!?__python2:        %global __python2 /usr/bin/python2}
redhat/python-exabgp.spec:%{!?__python2:        %global __python2 /usr/bin/python2}

So we can set python3 as the main release.

Comment 14 Miro Hrončok 2018-12-28 12:09:48 UTC
This is now Python 3 only.


Note You need to log in before you can comment on or make changes to this bug.