Commit 88f6d8d7 authored by Julien Muchembled's avatar Julien Muchembled

python2.7: small cleanup

parent fc078c3f
...@@ -33,11 +33,8 @@ package_version = 2.7.18 ...@@ -33,11 +33,8 @@ package_version = 2.7.18
package_version_suffix = package_version_suffix =
md5sum = fd6cc8ec0a78c44036f825e739f36e5a md5sum = fd6cc8ec0a78c44036f825e739f36e5a
# This is actually the default setting for prefix, but we can't use it in
# other settings in this part if we don't set it explicitly here.
prefix = @@LOCATION@@
version = 2.7 version = 2.7
executable = ${:prefix}/bin/python${:version} executable = @@LOCATION@@/bin/python${:version}
patch-options = -p1 patch-options = -p1
patches = patches =
...@@ -61,11 +58,11 @@ make-targets = make profile-opt && make install ...@@ -61,11 +58,11 @@ make-targets = make profile-opt && make install
# recent RedHat would otherwise mangle them, either failing ('python' is # recent RedHat would otherwise mangle them, either failing ('python' is
# ambiguous and 'python2' is not supported anymore) or replacing with # ambiguous and 'python2' is not supported anymore) or replacing with
# something that's really wrong (/usr/bin/python...). # something that's really wrong (/usr/bin/python...).
post-install = cd '${:prefix}' && post-install = cd '%(prefix)s' &&
find -executable -type f -print0 | find -executable -type f -print0 |
xargs -0 grep -I -m 1 '' | xargs -0 grep -I -m 1 '' |
sed -n 's,:#! */usr/bin/env \+python2\?$,,p' | sed -n 's,:#! */usr/bin/env \+python2\?$,,p' |
xargs -d '\n' sed -i '1s,.*,#!${:executable},' xargs -d '\n' sed -i '1s,.*,#!%(executable)s,'
# the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic, # the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic,
# which would otherwise load the system libmagic.so with ctypes # which would otherwise load the system libmagic.so with ctypes
......
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