easybuild-easyblocks
easybuild-easyblocks copied to clipboard
PythonPackage doesn't allow version specific setting of EC variables like `use_pip`
The init method of PythonPackage does a lot depending on EC params
For some Python packages with own easyblocks, such as numpy, we may want to use pip starting at a specific version, i.e. set use_pip = True
. However the required self.version
isn't available until __init__
of EasyBlock finishes, so the derived easyblock must call that first. This however results in PythonPackage setting a lot of member variables already, especially it changes EC variables. Some only work for pip or setup.py: https://github.com/easybuilders/easybuild-easyblocks/blob/9e1cdf245fdd6b4d803885562eb084b6df4e236b/easybuild/easyblocks/generic/pythonpackage.py#L449-L453
Hence when the derived EasyBlock wants to/can change use_pip
the state has already been irreversibly modified.