Skip to content
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

installation of EasyBuild fails in 2021.12 pilot after upgrade to more recent setuptools version in compat layer #191

Closed
boegel opened this issue Oct 17, 2022 · 4 comments
Labels
bug Something isn't working pilot-2021.12

Comments

@boegel
Copy link
Contributor

boegel commented Oct 17, 2022

The installation of the latest version of EasyBuild using eb --install-latest-eb-release fails after the upgrade of setuptools in the compat layer from 59.4.0 to 65.2.0 (see also EESSI/compatibility-layer#155).

The problem seem to boil down to a change in how the installation is being done: rather than a "flat" installation, .egg directories are being installed:

# note: $EESSI_SOFTWARE_SUBDIR_OVERRIDE was set to '`just-a-test`' at the top of EESSI-pilot-install-software.sh
$ ls -l /cvmfs/pilot.eessi-hpc.org/versions/2021.12/software/linux/x86_64/intel/skylake_avx512-test/software/EasyBuild/4.6.1/lib/python3.9/site-packages/
total 4
-rw-rw-r-- 1 vsc40023 vsc40023 117 Oct 17 18:21 easy-install.pth
drwxrwxr-x 2 vsc40023 vsc40023  39 Oct 17 18:20 easybuild_easyblocks-4.6.1-py3.9.egg
drwxrwxr-x 2 vsc40023 vsc40023  39 Oct 17 18:20 easybuild_easyconfigs-4.6.1-py3.9.egg
drwxrwxr-x 2 vsc40023 vsc40023  77 Oct 17 18:20 easybuild_framework-4.6.1-py3.9.egg

Although an accompanying easy-install.pth file is installed that is supposed to ensure that the .egg directories get added to the Python search path, this is not happening, which leads to import easybuild test failing.
The latter is probably the result of a deliberate breaking change in setuptools 49.0.0, see also easybuilders/easybuild-easyblocks#2693 + pypa/setuptools#2166.

What is not clear to me is why the .egg directories are now suddenly being installed, I haven't found out yet what triggers this.
It does seem to be related to recent breaking changes in setuptools though, primarily the switch to using a vendored copy of distuils rather than using the distutils that comes with the Python installation itself; see https://setuptools.pypa.io/en/latest/history.html#v60-0-0, and the deprecation of using setup.py install (cfr. pypa/setuptools#2824, although that's in place since setuptools 58.3.0).

What is becoming clear is that we need to actively move away from using setup.py install when installing EasyBuild with EasyBuild, and favor the use of pip install instead whenever it makes sense...
As a workaround, the following leads to a working installation of the latest EasyBuild release:

eb --install-latest-eb-release --try-amend=use_pip=1
@boegel boegel added bug Something isn't working pilot-2021.12 labels Oct 17, 2022
@boegel
Copy link
Contributor Author

boegel commented Oct 17, 2022

In addition to this, the subsequent installation of EasyBuild v4.5.0 also fails, but for a different reason: EasyBuild v4.5.0 does not include the fix implemented in easybuilders/easybuild-easyconfigs#15206 yet, and because setuptools > 61.0 is used we're hitting the outright confusing installation error that mentions that path.py is not a regular file (it's not, it's a directory, see here).

@boegel
Copy link
Contributor Author

boegel commented Oct 17, 2022

To fix these issues, we should:

@boegel
Copy link
Contributor Author

boegel commented Oct 17, 2022

Updated EasyBuildMeta easyblock that fixes these issues: easybuilders/easybuild-easyblocks#2805

poksumdo pushed a commit to poksumdo/software-layer that referenced this issue Oct 22, 2022
Also removed the section testing if the fix for EESSI#191 works (it did/does).
@boegel
Copy link
Contributor Author

boegel commented Nov 2, 2022

Closing this, fixes are included in latest EasyBuild release (v4.6.2)

@boegel boegel closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pilot-2021.12
Projects
None yet
Development

No branches or pull requests

1 participant