From e33639113b06fa91057e06d4d5394e870ce93ebe Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Aug 30 2018 09:52:44 +0000 Subject: Set shebangs to specific Python version Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1623504 --- diff --git a/pypy.spec b/pypy.spec index e010f88..c9f298c 100644 --- a/pypy.spec +++ b/pypy.spec @@ -318,10 +318,10 @@ rm lib-python/2.7/ensurepip/_bundled/*.whl rmdir lib-python/2.7/ensurepip/_bundled %endif -# Replace /usr/local/bin/python shebangs with /usr/bin/python: -find -name "*.py" -exec \ +# Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2: +find \( -name "*.py" -o -name "py.cleanup" \) -exec \ sed \ - -i -e "s|/usr/local/bin/python|/usr/bin/python|" \ + -i -r -e "s@/usr/(local/)?bin/(env )?python(2|3)?@/usr/bin/%{bootstrap_python_interp}@" \ "{}" \ \;