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.
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
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'.
This has been fixed in rawhide.