File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,16 @@ jobs:
310
310
- name : Install nightly Cython
311
311
run : |
312
312
pip install git+https://github.com/cython/cython
313
+ # Set PYTHON_GIL=0 to force GIL off during tests and then manually verify
314
+ # importing numpy does not enable the GIL. When f2py grows the ability to
315
+ # declare GIL-disabled support we can just run the tests without the
316
+ # environment variable
313
317
- uses : ./.github/meson_actions
314
318
env :
315
- # needed until f2py grows a config flag for GIL-disabled support
316
319
PYTHON_GIL : 0
320
+ - name : Verify import does not re-enable GIL
321
+ run : |
322
+ if [[ $(python -c "import numpy" 2>&1) == "*The global interpreter lock (GIL) has been enabled*" ]]; then
323
+ echo "Error: Importing NumPy re-enables the GIL in the free-threaded build"
324
+ exit 1
325
+ fi
You can’t perform that action at this time.
0 commit comments