Bug 1310322 - python3-bitlyapi requires both Python 2 and Python 3
python3-bitlyapi requires both Python 2 and Python 3
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: python-bitlyapi (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Orsava
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: PYTHON3 PY3PATCH-AVAILABLE
  Show dependency treegraph
 
Reported: 2016-02-20 06:22 EST by Petr Viktorin
Modified: 2016-07-26 10:04 EDT (History)
4 users (show)

See Also:
Fixed In Version: python-bitlyapi-0.1.1-11.fc25
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-26 10:04:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Petr Viktorin 2016-02-20 06:22:50 EST
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 10:27:37 EST
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 15:21:00 EDT
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 13:53:40 EDT
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 05:40:33 EDT
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 04:59:49 EDT
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 05:01 EDT
Created attachment 1165867 [details]
Patch that removes the Python 2 dependency from the Python 3 subpackage.
Comment 7 Miro Hrončok 2016-06-23 11:13:29 EDT
I will push this patch, is looks good to me. I also believe Ralph would not mind.
Comment 8 Ralph Bean 2016-06-24 10:39:27 EDT
+1 thank you Miro!
Comment 9 Charalampos Stratakis 2016-07-26 10:04:09 EDT
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.