Bug 1475278 - python2 invokes /usr/bin/python
Summary: python2 invokes /usr/bin/python
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python2
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Charalampos Stratakis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-26 11:33 UTC by Miro Hrončok
Modified: 2018-06-21 14:35 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-06-21 14:35:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2017-07-26 11:33:18 UTC
python2 invokes /usr/bin/python

we need to get rid of that

examples:

$ head /usr/bin/pynche
#!/bin/bash
exec `python -c ...


$ grep '/usr/bin/env python' $(rpm -ql python2-tools | grep /usr/bin)
/usr/bin/msgfmt.py:#! /usr/bin/env python
/usr/bin/msgfmt2.7.py:#! /usr/bin/env python
/usr/bin/msgfmt2.py:#! /usr/bin/env python
/usr/bin/pygettext.py:#! /usr/bin/env python
/usr/bin/pygettext2.7.py:#! /usr/bin/env python
/usr/bin/pygettext2.py:#! /usr/bin/env python

Also plenty files in /usr/lib64/python2.7/ have such shebang.


I think this can be fixed by tweaking the $BinaryName variable in BuildPython() function.

Comment 1 Petr Viktorin (pviktori) 2017-08-09 08:28:14 UTC
Just changing $BinaryName doesn't cut it, as it's used for the in-tree binary name.

+ ./python2 /builddir/build/BUILD/Python-2.7.13/Tools/scripts/pathfix.py -i '/usr/bin/env python2' /builddir/build/BUILD/Python-2.7.13
/var/tmp/rpm-tmp.F8cgCC: line 117: ./python2: No such file or directory

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

Comment 3 Charalampos Stratakis 2018-06-21 14:35:38 UTC
This has been fixed in rawhide.


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