Bug 1361799

Summary: python-numexpr: cpuinfo.py has wrong shebang in the Python 3 subpackage
Product: [Fedora] Fedora Reporter: Petr Viktorin <pviktori>
Component: python-numexprAssignee: Thibault North <thibault.north>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: thibault.north, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-numexpr-2.6.1-3.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-08 20:23:25 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:
Bug Depends On:    
Bug Blocks: 1285816, 1312032    
Attachments:
Description Flags
Patch to fix shebangs none

Description Petr Viktorin 2016-07-30 16:47:16 UTC
Created attachment 1185824 [details]
Patch to fix shebangs

Hello,
Thank you for your effort of porting numexpr to Python 3 in Fedora! It's much appreciated.

However, there's one more issue: the cpuinfo.py script/module always has a '/usr/bin/python' shebang, even in the Python 3 subpackage. This causes an unfortunate dependency on Python 2.

Here's a patch to solve the issue.

Alternatively, since the module is not on $PATH, it might be easier to drop the shebang and not make it executable – users can still run it with:
    python3 -m numexpr.cpuinfo
which is easier than:
    /usr/lib64/python3.5/site-packages/numexpr/cpuinfo.py
The shebang and executable bit are not needed for the first case.

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



There is a section on shebangs in the Python RPM Porting Guide [0]
which covers this issue.

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!

[0] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#are-shebangs-dragging-you-down-to-python-2

Comment 1 Fedora Update System 2016-08-01 01:54:10 UTC
python-numexpr-2.6.1-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4d8cd0dec9

Comment 2 Fedora Update System 2016-08-01 20:57:06 UTC
python-numexpr-2.6.1-3.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-4d8cd0dec9

Comment 3 Fedora Update System 2016-08-08 20:23:23 UTC
python-numexpr-2.6.1-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.