Bug 1475278 - python2 invokes /usr/bin/python
python2 invokes /usr/bin/python
Product: Fedora
Classification: Fedora
Component: python2 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Charalampos Stratakis
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-26 07:33 EDT by Miro Hrončok
Modified: 2018-06-21 10:35 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2018-06-21 10:35:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Miro Hrončok 2017-07-26 07:33:18 EDT
python2 invokes /usr/bin/python

we need to get rid of that


$ head /usr/bin/pynche
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 2017-08-09 04:28:14 EDT
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 04:24:35 EDT
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 10:35:38 EDT
This has been fixed in rawhide.

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