stop using modextrapaths to update $PYTHONPATH with standard path to installed Python packages (lib/python%(pyshortver)s/site-packages)#20960
Conversation
|
That reminds me of an old PR of mine: #13385 However all but 1 of the ECs are now deprecated and that one is fixed here. However there was also an enhancement to CI which I extracted to #20963 And a regexp I used which you might try in your tree: |
13da972 to
c51b513
Compare
c51b513 to
2d1c32d
Compare
|
CI requires #21405 (which requires easybuilders/easybuild-framework#4644) after easybuilders/easybuild-framework#4634 |
modextrapaths to update $PYTHONPATH with standard path to installed Python packages (lib/python*/site-packages)
modextrapaths to update $PYTHONPATH with standard path to installed Python packages (lib/python*/site-packages)modextrapaths to update $PYTHONPATH with standard path to installed Python packages (lib/python%(pyshortver)s/site-packages)
…andard lib/python*/site-packages path
a89f37b to
8882e93
Compare
…dard path to installed Python packages
test/easyconfigs/easyconfigs.py
Outdated
| modextrapaths = ec.get('modextrapaths', {}) | ||
| regex = re.compile(r'^lib*/python[0-9]\.[0-9]+/site-packages$') | ||
| for key, value in modextrapaths.items(): | ||
| value = resolve_template(value, ec.template_values) |
There was a problem hiding this comment.
ec.get has a resolve parameter defaulting to True, so it seems the value is already resolved at this point, isn't it?
If it was indeed required I'd suggest putting it below the check to avoid resolving every value without using almost any
There was a problem hiding this comment.
Ah, maybe, I didn't actually verify that tbh... Will check
…via modextrapaths
|
Test report by @boegel |
|
The two failures have nothing to do the changes being made here: For For So it won't let it block this PR... |
|
Going in, thanks @Micket! |
|
Updated the PR for adding the CI check: #19061 |
All the trivial cases cleaned up here. Some others i could potentially partly clean up, which uses a mix of several PYTHONPATH (standard + nonstandard location, Spark is an example of such an easyconfig).
Should of course not be merged until the corresponding framework PR is merged.
$PYTHONPATHor$EBPYTHONPREFIXESin generated module files by automatically scanning for Python site package directories (as configured viaprefer-python-search-path) easybuild-framework#4539