-
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
Move sitecustomize.py into site-packages #3514
base: 5.0.x
Are you sure you want to change the base?
Conversation
adcf2f0
to
8c30f6b
Compare
if self.cfg.get('ebpythonprefixes'): | ||
txt += self.module_generator.prepend_paths(PYTHONPATH, self.pythonpath) | ||
new_dir = os.path.join('lib', 'python' + self.pyshortver, 'site-packages') | ||
old_dir = os.path.join(log_path(), 'python') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log_path
isn't actually the correct path, see #3400
Maybe we can either use easybuild
directly (if I remember that path correctly) or at least add a comment why log_path
is abused here
txt += self.module_generator.prepend_paths(PYTHONPATH, self.pythonpath) | ||
new_dir = os.path.join('lib', 'python' + self.pyshortver, 'site-packages') | ||
old_dir = os.path.join(log_path(), 'python') | ||
if not os.path.exists(os.path.join(self.installdir, new_dir, 'sitecustomize.py')): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we maybe use a "constant" for this path similar to self.pythonpath
to avoid repeating it in 2 locations that are quite a bit apart? I'd also check if the script exists in old_dir
(or at least that folder) before adding the old path
fixes #3493