File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
[build-system ]
2
2
# Minimum requirements for the build system to execute.
3
3
requires = [
4
- " setuptools>=61 .0" ,
4
+ " setuptools<60 .0" ,
5
5
" wheel" ,
6
6
" Cython>=0.29.24" ,
7
7
Original file line number Diff line number Diff line change 8
8
import sys
9
9
import textwrap
10
10
import warnings
11
- import subprocess
12
-
13
- from setuptools .errors import CompileError , LinkError
14
11
15
12
from .pre_build_helpers import compile_test_program
16
13
@@ -75,6 +72,7 @@ def check_openmp_support():
75
72
76
73
extra_postargs = get_openmp_flag
77
74
75
+ exception_msg = ""
78
76
try :
79
77
output = compile_test_program (
80
78
code , extra_preargs = extra_preargs , extra_postargs = extra_postargs
@@ -91,12 +89,15 @@ def check_openmp_support():
91
89
else :
92
90
openmp_supported = False
93
91
94
- except (CompileError , LinkError , subprocess .CalledProcessError ):
92
+ except Exception as exception :
93
+ exception_msg = str (exception )
95
94
openmp_supported = False
96
95
97
96
if not openmp_supported :
98
97
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
+ )
100
101
else :
101
102
message = textwrap .dedent (
102
103
"""
You can’t perform that action at this time.
0 commit comments