Improve the shebang in the venv, so they work from any directory.

This commit is contained in:
Dave Page 2021-03-15 15:27:17 +00:00
parent d4348bd726
commit 60dbb81883

View File

@ -87,7 +87,7 @@ _create_python_env() {
# Fixup shebangs
cd "${BUNDLE_DIR}/Contents/Frameworks/Python.framework/Versions/Current/bin"
grep -RiIl 'mac-build' * | xargs sed -i '' 's/\/.*\/python3\./.\/python3./g'
grep -RiIl 'mac-build' * | xargs sed -i '' 's/\/.*\/python3\./\$(dirname \"$0\")\/python3./g'
# Remove some things we don't need
cd "${BUNDLE_DIR}/Contents/Frameworks/Python.framework"