Skip to content

Commit

Permalink
scripts: Adding common Python settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Nov 2, 2019
1 parent 729a2e3 commit eb927b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/download-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ function pin_conda_package {
echo ""
echo "Initializing environment"
echo "---------------------------------"

export PYTHONHASHSEED=0
export PYTHONDONTWRITEBYTECODE=1
# Only works with Python 3.8
# export PYTHONPYCACHEPREFIX=$BUILD_DIR/conda/__pycache__
export PYTHONNOUSERSITE=1

# Install and setup conda for downloading packages
export PATH=$CONDA_DIR/bin:$PATH:/sbin
(
Expand Down
8 changes: 8 additions & 0 deletions scripts/enter-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ function check_import_version {
echo ""
echo "Checking environment"
echo "---------------------------------"

unset PYTHONPATH
export PYTHONHASHSEED=0
export PYTHONDONTWRITEBYTECODE=1
# Only works with Python 3.8
# export PYTHONPYCACHEPREFIX=$BUILD_DIR/conda/__pycache__
export PYTHONNOUSERSITE=1

# Install and setup conda for downloading packages
export PATH=$CONDA_DIR/bin:$PATH:/sbin

Expand Down

0 comments on commit eb927b8

Please sign in to comment.