Skip to content

Commit

Permalink
Fix pyvenv.cfg mangling for python versioned bin
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Feb 13, 2023
1 parent 9ac1f63 commit 7537133
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions share/brewkit/python-venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PROJECT_NAME=$(basename "$(dirname "$PREFIX")")
VERSION=$(basename "$PREFIX")
PYTHON_VERSION=$(python --version | cut -d' ' -f2)
PYTHON_VERSION_MAJ=$(echo $PYTHON_VERSION | cut -d. -f1)
PYTHON_VERSION_MIN=$(echo $PYTHON_VERSION | cut -d. -f1,2)
PYTHON_VERSION_MIN=$(echo $PYTHON_VERSION | cut -d. -f2)

python -m venv $PREFIX/libexec

Expand Down Expand Up @@ -39,7 +39,7 @@ cat <<EOF >>activate
sed -i.bak \\
-e "s|$TEA_PREFIX/python.org/v$PYTHON_VERSION|\$TEA_PREFIX/python.org/v$PYTHON_VERSION_MAJ|" \\
-e 's|bin/python$PYTHON_VERSION_MAJ.$PYTHON_VERSION_MIN|bin/python|' \\
-e 's|bin/python$PYTHON_VERSION_MAJ\\.$PYTHON_VERSION_MIN|bin/python|' \\
-e "s|$PREFIX/libexec|\$TEA_PREFIX/$PROJECT_NAME/$VERSION/libexec|" \\
\$VIRTUAL_ENV/pyvenv.cfg
rm \$VIRTUAL_ENV/pyvenv.cfg.bak
Expand Down

0 comments on commit 7537133

Please sign in to comment.