-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put our Python sitecustomize.py
into the site-packages
folder
#3493
Comments
Hmm, that's probably a better suggestion than what's proposed in #3400
Why is that a problem exactly? We could add an opt-out (based on an environment variable) to |
@Micket Thoughts on this? |
Because it is a) a breaking change as that worked before and b) for users to change ebpythonprefixes-handling afterwards they'd need to rebuild the whole module.
That would work yes, but would still cause some unnecessary overhead when starting any python script/application due to Python loading the sitecustomize and then do nothing. Not sure if we should care though... Question is then: Should we always install it and allow to disable it even when a site does never want to use it? That would be required for |
I don't know if placing sitecustomize separately had some strong reason behind it, so i'm passing that question on to @bartoldeman I'm not the least bit concerned with users who change their mind on if they want to support ebpythonprefixes or not. Worst case, a rebuild, or you can fix it manually into existing installations if you can't afford the "downtime" (i.e. just delete sitecustomize.py). The only thing we need to keep track of if we change location is to keep the old PYTHONPATH when doing |
Input from @bartoldeman would be nice too here :) |
Or rather if it does NOT exists in the site-packages folder. |
We use a separate folder for that file that handles
$EBPYTHONPREFIXES
:easybuild-easyblocks/easybuild/easyblocks/p/python.py
Lines 147 to 148 in 5838f1d
This requires putting it into
$PYTHONPATH
. If we'd put it into thesite-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-L642However it avoids an additional path entry and potential conflicts with software clearing
$PYTHONPATH
to workaround user mistakes.I found that for
Spyder (IDE)
: spyder-ide/spyder#22681The text was updated successfully, but these errors were encountered: