easybuild-easyblocks
easybuild-easyblocks copied to clipboard
Put our Python `sitecustomize.py` into the `site-packages` folder
We use a separate folder for that file that handles $EBPYTHONPREFIXES: https://github.com/easybuilders/easybuild-easyblocks/blob/5838f1d639566ae3e0da915f1b8a31c6d3cf04d4/easybuild/easyblocks/p/python.py#L147-L148
This requires putting it into $PYTHONPATH. If we'd put it into the site-packages folder directly we don't need that entry.
Downside is that ebpythonprefixes cannot be disabled by --module-only rebuilds: https://github.com/easybuilders/easybuild-easyblocks/blob/5838f1d639566ae3e0da915f1b8a31c6d3cf04d4/easybuild/easyblocks/p/python.py#L641C26-L642
However it avoids an additional path entry and potential conflicts with software clearing $PYTHONPATH to workaround user mistakes.
I found that for Spyder (IDE): https://github.com/spyder-ide/spyder/issues/22681