diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 5bd845147b0f3..83b3b1b7ab626 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 @@ -88,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 @@ -98,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 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 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",