Skip to content

Commit

Permalink
Allow working with a new python (#5401)
Browse files Browse the repository at this point in the history
* Workaround issue with CMake 3.29.0

* Allow working with a new python
  • Loading branch information
ktf authored Mar 28, 2024
1 parent a6ee99c commit 6570cce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ unset VIRTUAL_ENV
# NOTE: If you get an error saying "Error: This build of python cannot create
# venvs without using symlinks", then you are using the MacOS Python. You
# should be using the Homebrew Python instead, so run "brew install python".
python3 -m venv --copies "$INSTALLROOT"
python3 -m venv "$INSTALLROOT"
. "$INSTALLROOT/bin/activate"
# From now on, we use the python3 binary copied into the venv. This makes pip
# install packages into the venv.
Expand All @@ -46,7 +46,7 @@ find "$INSTALLROOT" -mindepth 2 -maxdepth 2 \

# Fix shebangs: remove hardcoded Python path. Scripts' shebangs will point at
# the venv's python using an absolute path by default, which we must change.
sed -r -i.deleteme -e "1s,^#!$INSTALLROOT/bin/,#!/usr/bin/env ," "$INSTALLROOT"/bin/*
find "$INSTALLROOT"/bin -type f -exec sed -r -i.deleteme -e "1s,^#!$INSTALLROOT/bin/,#!/usr/bin/env ," {} \;
rm -f "$INSTALLROOT"/bin/*.deleteme

# Link python -> python$pyver, so we can refer to it in PYTHONPATH without knowing pyver.
Expand Down

0 comments on commit 6570cce

Please sign in to comment.