Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
demo: check if we are in a virtualenv before overriding PYTHONPATH (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Velten committed May 30, 2022
1 parent 7f92ac4 commit 1fd1856
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog.d/12916.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Check if we are in a virtual environment before overriding the `PYTHONPATH` environment variable in the demo script.
11 changes: 6 additions & 5 deletions demo/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ CWD=$(pwd)

cd "$DIR/.." || exit

PYTHONPATH=$(readlink -f "$(pwd)")
export PYTHONPATH


echo "$PYTHONPATH"
# Do not override PYTHONPATH if we are in a virtual env
if [ "$VIRTUAL_ENV" = "" ]; then
PYTHONPATH=$(readlink -f "$(pwd)")
export PYTHONPATH
echo "$PYTHONPATH"
fi

# Create servers which listen on HTTP at 808x and HTTPS at 848x.
for port in 8080 8081 8082; do
Expand Down

0 comments on commit 1fd1856

Please sign in to comment.