easybuild-easyblocks icon indicating copy to clipboard operation
easybuild-easyblocks copied to clipboard

Enhance PythonPackage to take into account PYTHONPATH changes in setuptools >= 49.0.0

Open teojgo opened this issue 2 years ago • 3 comments

.egg paths are not taken into account, therefore during the sanity stage of EasyBuild, importing the installed module will fail. See https://github.com/pypa/setuptools/blob/d9a3b57cfabcae25539b5118977b2f6ef78d641b/changelog.d/2165.breaking.rst

teojgo avatar Mar 07 '22 12:03 teojgo

This is a problem for any easyconfig that uses a Python dependency that includes setuptools >= 49.0, and that uses use_pip = False for some reason.

I'm not sure how easy it will be to fix this. I guess one option could be to let PythonPackage add the actual *.egg directories to $PYTHONPATH, rather than only the parent path? That won't be enough though, since .egg could also be a zipped file...

@bartoldeman @mboisson Any insights here?

boegel avatar Mar 25 '22 14:03 boegel

Hum, we have not hit this, but we don't ever use PYTHONPATH, we use EBPYTHONPREFIXES with the sitecustomize.py, so maybe we are immune to this change ?

mboisson avatar Mar 25 '22 14:03 mboisson

We are not using $EBPYTHONPREFIXES unless multiple Python versions are used.

Flamefire avatar Feb 10 '23 13:02 Flamefire