8000 CI Allow for lower versions of setuptools [cd build gh] · scikit-learn/scikit-learn@af0b25c · GitHub
[go: up one dir, main page]

Skip to content

Commit af0b25c

Browse files
committed
CI Allow for lower versions of setuptools [cd build gh]
1 parent bd22900 commit af0b25c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
# Minimum requirements for the build system to execute.
33
requires = [
4-
"setuptools>=61.0",
4+
"setuptools<60.0",
55
"wheel",
66
"Cython>=0.29.24",
77

sklearn/_build_utils/openmp_helpers.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
import sys
99
import textwrap
1010
import warnings
11-
import subprocess
12-
13-
from setuptools.errors import CompileError, LinkError
1411

1512
from .pre_build_helpers import compile_test_program
1613

@@ -75,6 +72,7 @@ def check_openmp_support():
7572

7673
extra_postargs = get_openmp_flag
7774

75+
exception_msg = ""
7876
try:
7977
output = compile_test_program(
8078
code, extra_preargs=extra_preargs, extra_postargs=extra_postargs
@@ -91,12 +89,15 @@ def check_openmp_support():
9189
else:
9290
openmp_supported = False
9391

94-
except (CompileError, LinkError, subprocess.CalledProcessError):
92+
except Exception as exception:
93+
exception_msg = str(exception)
9594
openmp_supported = False
9695

9796
if not openmp_supported:
9897
if os.getenv("SKLEARN_FAIL_NO_OPENMP"):
99-
raise CompileError("Failed to build with OpenMP")
98+
raise Exception(
99+
f"Failed to build with OpenMP, with message {exception_msg}"
100+
)
100101
else:
101102
message = textwrap.dedent(
102103
"""

0 commit comments

Comments
 (0)
0