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 1310322

Summary: python3-bitlyapi requires both Python 2 and Python 3
Product: [Fedora] Fedora Reporter: Petr Viktorin (pviktori) <pviktori>
Component: python-bitlyapiAssignee: Tomas Orsava <torsava>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: cstratak, mhroncok, rbean, torsava
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 14:04:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1285816, 1312032    
Attachments:
Description Flags
Patch that removes the Python 2 dependency from the Python 3 subpackage. none

Description Petr Viktorin (pviktori) 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.