Python Configuration

Setting the environment (python)

To keep a consistent environment for python, the following are set:

Configuration (bash)

Define constants (bash)

Assuming bash constants has been followed:

~ $ printf "\\n# Developer environment (python)\\n\\n" >> $RC
~ $ printf "export PYTHONOPTIMIZE=0\n" >> $RC
~ $ printf "export PYTHONUNBUFFERED=1\n" >> $RC
~ $ printf "export PYTHONDONTWRITEBYTECODE=1\n" >> $RC
~ $ printf "export PYTHONHASHSEED=42\n" >> $RC
~ $ printf "export PYTHONIOENCODING=utf8\n" >> $RC
~ $ printf "export PYTHONASYNCIODEBUG=1\n" >> $RC
~ $ printf "export PYTHONUTF8=1\n" >> $RC
~ $ printf "export PYTHONDEVMODE=1\n" >> $RC

Define virtual environment root directory (PY_VENV_DIR)

Note

The following are optional

Define the root directory for all virtual environment installations.

~ $ printf "export PY_VENV_DIR=\$PREFIX/.share/virtualenvs\\n" >> $RC

Congratulations, a python baseline environment is now defined!