diff options
author | 2021-01-09 15:31:10 -0800 | |
---|---|---|
committer | 2021-01-09 16:29:56 -0800 | |
commit | dd307c793588cdbfb5f759a91f337299a842f05d (patch) | |
tree | 6f32779bdd221bd0eede9ed86e72045890f98155 /scripts | |
parent | Merge pull request #86 from python-discord/precommit-pycharm (diff) |
Use a custom directory for exposed Python packages
Isolate snekbox's dependencies from the packages available within the
Python interpreter. Disable Python's default behaviour of site-dependent
manipulations of sys.path. The custom directory looks like a user site
to allow `pip install --user` to work with it. However, snekbox will see
it as simply an additional search path for modules rather than as a user
site.
Disable isolated mode (-I) because it implies (-E), which ignores
PYTHON* environment variables. This conflicts with the reliance on
`PYTHONPATH`.
Specify `PYTHONUSERBASE` in the Dockerfile to make installing packages
to expose more intuitive for users. Otherwise, they'd have to remember
to set this variable every time they need to install something.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/.profile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/.profile b/scripts/.profile index 9bf8e09..11c8d78 100644 --- a/scripts/.profile +++ b/scripts/.profile @@ -17,5 +17,5 @@ nsjpy() { nsjail \ --config "${NSJAIL_CFG:-/snekbox/config/snekbox.cfg}" \ $nsj_args -- \ - /usr/local/bin/python -Iqu -c "$@" + /usr/local/bin/python -Squ -c "$@" } |