-
Notifications
You must be signed in to change notification settings - Fork 216
Prefer $EBPYTHONPREFIXES over $PYTHONPATH
#4496
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
Closed
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0ec2df5
Make new safe module abstraction for update_paths
Micket 74a3cb3
Replace PYTHONPATHs with EBPYTHONPREFIX when possible
Micket 03e304e
Add option prefer-ebpythonprefix-over-pythonpath
Micket b07ea3f
Add warning for duplicated PYTHONPATH's that should not occur
Micket 8c66e1a
Add tests for PYTHONPATH to EBPYTHONPREFIX rewrite
Micket ccd3d7e
Move check for faulty PYTHONPATHs to always run it
Micket f76f320
Move conversion of paths as str to lists earlier removing duplicated …
Micket 8b5389f
Fix name EBPYTHONPREFIX to EBPYTHONPREFIXES which is used in sitecust…
Micket cb6adb0
Move _filter_paths check to _update_paths
Micket 4a11f2f
Simplify logic for _filter_paths
Micket c471e03
Rename flag to replace_pythonpath
Micket 2676e4e
Add assertion for input argument to _filter_paths.
Micket f4fbe76
Improve typing hints for list of str
Micket 92f0e62
Also use List from typing
Micket e91186e
Improve typing hints for list of str
Micket 236c67f
Improve typing hints for list of str
Micket ca304fb
Update easybuild/tools/module_generator.py
Micket File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -694,6 +694,9 @@ def append_paths(*args, **kwargs): | |
| res = append_paths('key', ['[email protected]'], expand_relpaths=False) | ||
| self.assertEqual("append-path\tkey\t\[email protected]\n", res) | ||
|
|
||
| expected = "append-path\tEBPYTHONPREFIXES\t\t$root\nappend-path\tPYTHONPATH\t\t$root/foo\n" | ||
| res = append_paths('PYTHONPATH', ['lib/python3.12/site-packages', 'foo']) | ||
| self.assertEqual(expected, res) | ||
| else: | ||
| expected = ''.join([ | ||
| 'append_path("key", pathJoin(root, "path1"))\n', | ||
|
|
@@ -714,6 +717,10 @@ def append_paths(*args, **kwargs): | |
| res = append_paths('key', ['[email protected]'], expand_relpaths=False) | ||
| self.assertEqual('append_path("key", "[email protected]")\n', res) | ||
|
|
||
| expected = 'append_path("EBPYTHONPREFIXES", root)\nappend_path("PYTHONPATH", pathJoin(root, "foo"))\n' | ||
| res = append_paths('PYTHONPATH', ['lib/python3.12/site-packages', 'foo']) | ||
| self.assertEqual(expected, res) | ||
|
|
||
| self.assertErrorRegex(EasyBuildError, "Absolute path %s/foo passed to update_paths " | ||
| "which only expects relative paths." % self.modgen.app.installdir, | ||
| append_paths, "key2", ["bar", "%s/foo" % self.modgen.app.installdir]) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.