Commit 9ba04900 authored by Julien Muchembled's avatar Julien Muchembled

python2.7: mangle shebang of installed python scripts

parent 77d9f997
......@@ -56,6 +56,16 @@ configure-options =
# Profiled build:
make-binary =
make-targets = make profile-opt && make install
# Mangle shebang to use installed Python. This is not only a convenience:
# when building system packages (e.g. re6st-node using OBS), some OS like
# recent RedHat would otherwise mangle them, either failing ('python' is
# ambiguous and 'python2' is not supported anymore) or replacing with
# something that's really wrong (/usr/bin/python...).
post-install = cd '${:prefix}' &&
find -executable -type f -print0 |
xargs -0 grep -I -m 1 '' |
sed -n 's,:#! */usr/bin/env \+python2\?$,,p' |
xargs -d '\n' sed -i '1s,.*,#!${:executable},'
extra-ldflags =
# the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment