From 59ed7039d1ff0048aa38c1c9e8ade72f8d953958 Mon Sep 17 00:00:00 2001 From: Julien Jerphanion Date: Thu, 4 Nov 2021 09:43:36 +0100 Subject: [PATCH 1/3] FIX Don't use setuptools 58.5 which introduces regression This is a temporary fix for: https://github.com/pypa/setuptools/issues/2849 --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3762d2f229f76..3749e0a5874d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,8 @@ [build-system] # Minimum requirements for the build system to execute. requires = [ - "setuptools", + # TODO: Remove the specifier once setuptools#2849 is resolved. + "setuptools<58.5", "wheel", "Cython>=0.28.5", From c6d1767c6e5242b81352131e3f9b61c099c6590b Mon Sep 17 00:00:00 2001 From: Julien Jerphanion Date: Thu, 4 Nov 2021 10:08:00 +0100 Subject: [PATCH 2/3] [WIP] Adapt CI for workaround --- build_tools/azure/install.sh | 2 ++ build_tools/azure/install_win.sh | 6 ++++-- build_tools/circle/build_doc.sh | 2 ++ build_tools/circle/build_test_arm.sh | 4 +++- build_tools/circle/build_test_pypy.sh | 3 ++- build_tools/travis/install_main.sh | 2 ++ 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 5bd845147b0f3..ebffb9190bd02 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -13,6 +13,8 @@ fi make_conda() { TO_INSTALL="$@" + # TODO: Remove this line once setuptools#2849 is resolved. + TO_INSTALL="$TO_INSTALL setuptools<58.5" if [[ "$DISTRIB" == *"mamba"* ]]; then mamba create -n $VIRTUALENV --yes $TO_INSTALL else diff --git a/build_tools/azure/install_win.sh b/build_tools/azure/install_win.sh index 2c18d8a63da1f..2afbe2aa609ef 100755 --- a/build_tools/azure/install_win.sh +++ b/build_tools/azure/install_win.sh @@ -4,7 +4,8 @@ set -e set -x if [[ "$PYTHON_ARCH" == "64" ]]; then - conda create -n $VIRTUALENV -q -y python=$PYTHON_VERSION numpy scipy cython matplotlib wheel pillow joblib + conda create -n $VIRTUALENV -q -y python=$PYTHON_VERSION numpy scipy cython matplotlib wheel pillow joblib \ + "setuptools<58.5" # TODO: Remove this line once setuptools#2849 is resolved. source activate $VIRTUALENV @@ -16,7 +17,8 @@ if [[ "$PYTHON_ARCH" == "64" ]]; then pip install pytest==$PYTEST_VERSION fi else - pip install numpy scipy cython pytest wheel pillow joblib threadpoolctl + pip install numpy scipy cython pytest wheel pillow joblib threadpoolctl \ + "setuptools<58.5" # TODO: Remove this line once setuptools#2849 is resolved. fi if [[ "$PYTEST_XDIST_VERSION" != "none" ]]; then diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index 8facdc59a6c56..f14b48a7df418 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -181,6 +181,8 @@ pip install "$(get_dep sphinx-gallery $SPHINX_GALLERY_VERSION)" pip install "$(get_dep numpydoc $NUMPYDOC_VERSION)" pip install "$(get_dep sphinx-prompt $SPHINX_PROMPT_VERSION)" pip install "$(get_dep sphinxext-opengraph $SPHINXEXT_OPENGRAPH_VERSION)" +# TODO: Remove this line once setuptools#2849 is resolved. +pip install "setuptools<58.5" # Set parallelism to 3 to overlap IO bound tasks with CPU bound tasks on CI # workers with 2 cores when building the compiled extensions of scikit-learn. diff --git a/build_tools/circle/build_test_arm.sh b/build_tools/circle/build_test_arm.sh index 67beaae5dba31..3d66ae270c6ee 100755 --- a/build_tools/circle/build_test_arm.sh +++ b/build_tools/circle/build_test_arm.sh @@ -50,7 +50,9 @@ mamba install --verbose -y ccache \ $(get_dep joblib $JOBLIB_VERSION) \ $(get_dep threadpoolctl $THREADPOOLCTL_VERSION) \ $(get_dep pytest $PYTEST_VERSION) \ - $(get_dep pytest-xdist $PYTEST_XDIST_VERSION) + $(get_dep pytest-xdist $PYTEST_XDIST_VERSION) \ + "setuptools<58.5" # TODO: Remove this line once setuptools#2849 is resolved. + setup_ccache if [[ "$COVERAGE" == "true" ]]; then diff --git a/build_tools/circle/build_test_pypy.sh b/build_tools/circle/build_test_pypy.sh index c1def8ce2670b..1b2d22f88f76a 100755 --- a/build_tools/circle/build_test_pypy.sh +++ b/build_tools/circle/build_test_pypy.sh @@ -13,7 +13,8 @@ conda install -y mamba mamba create -n pypy -y \ pypy numpy scipy cython \ joblib threadpoolctl pillow pytest \ - sphinx numpydoc docutils + sphinx numpydoc docutils \ + "setuptools<58.5" # TODO: remove this line once setuptools#2849 is resolved. eval "$(conda shell.bash hook)" conda activate pypy diff --git a/build_tools/travis/install_main.sh b/build_tools/travis/install_main.sh index c0795139859bb..9abace6b54ed9 100755 --- a/build_tools/travis/install_main.sh +++ b/build_tools/travis/install_main.sh @@ -47,6 +47,8 @@ conda create -n testenv --yes python=3.7 source activate testenv conda install -y scipy numpy pandas cython pip install joblib threadpoolctl +# TODO: This line once setuptools#2849 is resolved. +pip install "setuptools<58.5" pip install $(get_dep pytest $PYTEST_VERSION) pytest-xdist From b15258785667266a97a506aef069e40ba6d75edc Mon Sep 17 00:00:00 2001 From: Julien Jerphanion Date: Thu, 4 Nov 2021 10:17:32 +0100 Subject: [PATCH 3/3] [WIP] Adapt CI for workaround --- build_tools/azure/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index ebffb9190bd02..83b3b1b7ab626 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -90,7 +90,8 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then source $VIRTUALENV/bin/activate setup_ccache python -m pip install $(get_dep cython $CYTHON_VERSION) \ - $(get_dep joblib $JOBLIB_VERSION) + $(get_dep joblib $JOBLIB_VERSION) \ + "setuptools<58.5" # TODO: Remove this line once setuptools#2849 is resolved. elif [[ "$DISTRIB" == "debian-32" ]]; then apt-get update @@ -100,7 +101,8 @@ elif [[ "$DISTRIB" == "debian-32" ]]; then source $VIRTUALENV/bin/activate setup_ccache python -m pip install $(get_dep cython $CYTHON_VERSION) \ - $(get_dep joblib $JOBLIB_VERSION) + $(get_dep joblib $JOBLIB_VERSION) \ + "setuptools<58.5" # TODO: Remove this line once setuptools#2849 is resolved. elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then # FIXME: temporary fix to link against system libraries on linux