mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
demo: check if we are in a virtualenv before overriding PYTHONPATH (#12916)
This commit is contained in:
parent
7f92ac4c1c
commit
1fd1856afc
2 changed files with 7 additions and 5 deletions
1
changelog.d/12916.misc
Normal file
1
changelog.d/12916.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Check if we are in a virtual environment before overriding the `PYTHONPATH` environment variable in the demo script.
|
|
@ -6,11 +6,12 @@ CWD=$(pwd)
|
||||||
|
|
||||||
cd "$DIR/.." || exit
|
cd "$DIR/.." || exit
|
||||||
|
|
||||||
PYTHONPATH=$(readlink -f "$(pwd)")
|
# Do not override PYTHONPATH if we are in a virtual env
|
||||||
export PYTHONPATH
|
if [ "$VIRTUAL_ENV" = "" ]; then
|
||||||
|
PYTHONPATH=$(readlink -f "$(pwd)")
|
||||||
|
export PYTHONPATH
|
||||||
echo "$PYTHONPATH"
|
echo "$PYTHONPATH"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create servers which listen on HTTP at 808x and HTTPS at 848x.
|
# Create servers which listen on HTTP at 808x and HTTPS at 848x.
|
||||||
for port in 8080 8081 8082; do
|
for port in 8080 8081 8082; do
|
||||||
|
|
Loading…
Reference in a new issue