File tree Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ FREE_THREADED_BUILD="$(python -c"import sysconfig; print(bool(sysconfig.get_conf
24
24
if [[ $FREE_THREADED_BUILD == " True" ]]; then
25
25
python -m pip install -U --pre pip
26
26
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
27
- # python -m pip install git+https://github.com/serge-sans-paille/pythran
28
- python -m pip install ninja meson-python pybind11 pythran
27
+ python -m pip install git+https://github.com/serge-sans-paille/pythran
28
+ python -m pip install ninja meson-python pybind11
29
29
fi
30
30
31
31
# Install Openblas
Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ FREE_THREADED_BUILD="$(python -c"import sysconfig; print(bool(sysconfig.get_conf
66
66
if [[ $FREE_THREADED_BUILD == " True" ]]; then
67
67
python -m pip install -U --pre pip
68
68
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
69
- # python -m pip install git+https://github.com/serge-sans-paille/pythran
70
- python -m pip install ninja meson-python pybind11 pythran
69
+ python -m pip install git+https://github.com/serge-sans-paille/pythran
70
+ python -m pip install ninja meson-python pybind11
71
71
fi
72
72
73
73
# Install Openblas
Original file line number Diff line number Diff line change @@ -17,10 +17,8 @@ FREE_THREADED_BUILD="$(python -c"import sysconfig; print(bool(sysconfig.get_conf
17
17
if [[ $FREE_THREADED_BUILD == " True" ]]; then
18
18
python -m pip install -U --pre pip
19
19
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
20
- # TODO: Remove meson installation from source once a new release
21
- # that includes https://github.com/mesonbuild/meson/pull/13851 is available
22
- python -m pip install git+https://github.com/mesonbuild/meson
23
- python -m pip install ninja meson-python pybind11 pythran
20
+ python -m pip install git+https://github.com/serge-sans-paille/pythran
21
+ python -m pip install ninja meson-python pybind11
24
22
fi
25
23
26
24
# delvewheel is the equivalent of delocate/auditwheel for windows.
Original file line number Diff line number Diff line change @@ -2,10 +2,14 @@ set -xe
2
2
3
3
FREE_THREADED_BUILD=" $( python -c" import sysconfig; print(bool(sysconfig.get_config_var('Py_GIL_DISABLED')))" ) "
4
4
if [[ $FREE_THREADED_BUILD == " True" ]]; then
5
- # TODO: delete when importing numpy no longer enables the GIL
6
- # setting to zero ensures the GIL is disabled while running the
7
- # tests under free-threaded python
8
- export PYTHON_GIL=0
5
+ # Manually check that importing SciPy does not re-enable the GIL.
6
+ # In principle the tests should catch this but it seems harmless to leave it
7
+ # here as a final sanity check before uploading broken wheels
8
+ if [[ $( python -c " import scipy.stats" 2>&1 ) == * " The global interpreter lock (GIL) has been enabled" * ]]; then
9
+ echo " Error: Importing SciPy re-enables the GIL in the free-threaded build"
10
+ exit 1
11
+ fi
12
+
9
13
fi
10
14
11
15
python -c " import sys; import scipy; sys.exit(not scipy.test())"
You can’t perform that action at this time.
0 commit comments