Przeglądaj źródła

demo: check if we are in a virtualenv before overriding PYTHONPATH (#12916)

tags/v1.61.0rc1
Mathieu Velten 1 rok temu
committed by GitHub
rodzic
commit
1fd1856afc
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 7 dodań i 5 usunięć
  1. +1
    -0
      changelog.d/12916.misc
  2. +6
    -5
      demo/start.sh

+ 1
- 0
changelog.d/12916.misc Wyświetl plik

@@ -0,0 +1 @@
Check if we are in a virtual environment before overriding the `PYTHONPATH` environment variable in the demo script.

+ 6
- 5
demo/start.sh Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz