Skip to content

Commit

Permalink
CI: limit upper version of setuptools<50 for Jenkins build
Browse files Browse the repository at this point in the history
Builds on Jenkins started failing after `setuptools==0.50.0` was
released on August 30, 2020. This new version gets automatically
installed when using a `pyproject.toml` for the build system, but it
causes the installation of the `aiida-core` package through `pip` to
fail with the exception:

    ModuleNotFoundError: No module named 'setuptools._distutils'

Temporarily limiting the version of `setuptools` in the `pyproject.toml`
works around the problem for the time being.

The build is updated to also update the version of `pip` before
installing the package.
  • Loading branch information
sphuber committed Sep 1, 2020
1 parent 44fe2a7 commit de71581
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ pipeline {
}
stage('Build') {
steps {
sh 'pip install --upgrade --user pip'
sh 'pip install --user .[all]'
// To be able to do ssh localhost
sh 'ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa'
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = [ "setuptools>=40.8.0", "wheel", "reentry~=1.3", "fastentrypoints~=0.12",]
requires = [ "setuptools>=40.8.0,<50", "wheel", "reentry~=1.3", "fastentrypoints~=0.12",]
build-backend = "setuptools.build_meta:__legacy__"
2 changes: 1 addition & 1 deletion utils/dependency_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def generate_pyproject_toml():

pyproject = {
'build-system': {
'requires': ['setuptools>=40.8.0', 'wheel',
'requires': ['setuptools>=40.8.0,<50', 'wheel',
str(reentry_requirement), 'fastentrypoints~=0.12'],
'build-backend': 'setuptools.build_meta:__legacy__',
}
Expand Down

0 comments on commit de71581

Please sign in to comment.