Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix bulid for newer version of virtualenv (#3292)
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyRoseman authored Aug 12, 2020
1 parent d425237 commit 4fd068b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions scripts/install_python_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,27 @@ mkdir -p deps/local/include

pushd deps/local/include

set +x
echo "run 'ln -Ffs' files from ../../env/include/$PYTHON_FULL_NAME"
for f in ../../env/include/"$PYTHON_FULL_NAME"/*; do
if [[ -d "../../env/include/$PYTHON_FULL_NAME" ]]; then
SRC_INCLUDE_DIR="../../env/include/$PYTHON_FULL_NAME"
else
# Newer versions of virtualenv don't include header files
SRC_INCLUDE_DIR=$(${PYTHON} -c 'from sysconfig import get_paths as gp; print(gp()["include"])')
fi

echo "run 'ln -Ffs' files from ${SRC_INCLUDE_DIR}"
for f in $SRC_INCLUDE_DIR/*; do
ln -Ffs "$f" "$(basename "$f")"
done
set -x

popd

mkdir -p deps/local/bin
pushd deps/local/bin

set +x
echo "run 'ln -Ffs' on files from ../../env/bin/"
for f in ../../env/bin/*; do
ln -Ffs "$f" "$(basename "$f")"
done
set -x

popd

Expand Down

0 comments on commit 4fd068b

Please sign in to comment.