Skip to content

Commit

Permalink
minor fix to setting PYTHONPATH in install script (#343)
Browse files Browse the repository at this point in the history
Check PYTHONPATH for PWD substring before appending. Previously, PYTHONPATH
would contain duplicates of the same path for multiple launches of the install
script (depending on the shell).
  • Loading branch information
slabasan authored Apr 2, 2021
1 parent a1c7ccf commit 3180410
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/sh

if [ "$PYTHONPATH" != *"$PWD"* ]; then
PYTHONPATH=$PWD:$PYTHONPATH
fi
case "$PYTHONPATH" in
*"$PWD"*)
;;

*)
PYTHONPATH=$PWD:$PYTHONPATH
;;
esac

python setup.py build_ext --inplace

0 comments on commit 3180410

Please sign in to comment.