Bug 1310322 - python3-bitlyapi requires both Python 2 and Python 3
Summary: python3-bitlyapi requires both Python 2 and Python 3
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-bitlyapi
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Orsava
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3 PY3PATCH-AVAILABLE
TreeView+ depends on / blocked
 
Reported: 2016-02-20 11:22 UTC by Petr Viktorin
Modified: 2016-07-26 14:04 UTC (History)
4 users (show)

Fixed In Version: python-bitlyapi-0.1.1-11.fc25
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-26 14:04:09 UTC


Attachments (Terms of Use)
Patch that removes the Python 2 dependency from the Python 3 subpackage. (1.39 KB, patch)
2016-06-08 09:01 UTC, Tomas Orsava
no flags Details | Diff

Description Petr Viktorin 2016-02-20 11:22:50 UTC
The file /usr/bin/bitly from the python3-bitlyapi RPM has a /usr/bin/python2 shebang, pulling in Python 2 as a dependency.

Please switch the shebang to use Python 3.



If anything is unclear, or if you need any kind of assistance, you can
ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy
to help investigating or fixing this issue!

Comment 1 Jan Kurik 2016-02-24 15:27:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 2 Fedora Update System 2016-04-05 19:21:00 UTC
python-bitlyapi-0.1.1-10.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8349e659b8

Comment 3 Fedora Update System 2016-04-06 17:53:40 UTC
python-bitlyapi-0.1.1-10.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8349e659b8

Comment 4 Fedora Update System 2016-04-12 09:40:33 UTC
python-bitlyapi-0.1.1-10.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Tomas Orsava 2016-06-08 08:59:49 UTC
Hi Ralph!
Sorry for reopening the bug, but I noticed it was not fixed yet. If you do

`rpm -q --requires -p python3-bitlyapi-0.1.1-10.fc23.noarch.rpm`
you still get `/usr/bin/python2` in the results.

I see you tried to change the shebang using sed, and that can solve the issue in many cases, but it is only a solution of last resort. First it is important to try to install the correct version in the first place.

After you do `%py2_install` the binary will bi installed into %{_bindir}, so when you do `%py3_install` afterwords, setuptools (sometimes) choose not to overwrite it, and leave the Python 2 version in there—this is a known issue.

Therefore it is recommended to do `rm %{buildroot}%{_bindir}/*` right after `%py2_install` so that the Python 3 version is always installed in there instead.

I tested it on your package, and it successfully resolves the problem. I removed the `sed` as it no longer serves a purpose when this method is used.

Comment 6 Tomas Orsava 2016-06-08 09:01:12 UTC
Created attachment 1165867 [details]
Patch that removes the Python 2 dependency from the Python 3 subpackage.

Comment 7 Miro Hrončok 2016-06-23 15:13:29 UTC
I will push this patch, is looks good to me. I also believe Ralph would not mind.

Comment 8 Ralph Bean 2016-06-24 14:39:27 UTC
+1 thank you Miro!

Comment 9 Charalampos Stratakis 2016-07-26 14:04:09 UTC
Since this is fixed in rawhide, closing the bug.


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