Skip to content

Commit 7b5aca3

Browse files
scripts/test.py: allow 'cibw' command to build for graal.
1 parent e297fb5 commit 7b5aca3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

scripts/test.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,12 @@ def main(argv):
652652
# Rerun ourselves inside a venv if not already in a venv.
653653
if not venv_in():
654654
if graal:
655+
if 'cibw' in commands:
656+
# We don't create graal/pyenv so wheel/build commands
657+
# will not work.
658+
assert 'wheel' not in commands
659+
assert 'build' not in commands
660+
if graal and 'cibw' not in commands:
655661
# 2025-07-24: We need the latest pyenv.
656662
graalpy = 'graalpy-24.2.1'
657663
venv_name = f'venv-pymupdf-{graalpy}'
@@ -725,6 +731,7 @@ def main(argv):
725731
cibw_test_project,
726732
cibw_test_project_setjmp,
727733
cibw_skip_add_defaults,
734+
graal,
728735
)
729736

730737
elif command == 'install':
@@ -877,6 +884,7 @@ def cibuildwheel(
877884
cibw_test_project,
878885
cibw_test_project_setjmp,
879886
cibw_skip_add_defaults,
887+
graal,
880888
):
881889

882890
if cibw_sdist and platform.system() == 'Linux':
@@ -935,7 +943,10 @@ def cibuildwheel(
935943
CIBW_BUILD = env_extra.get('CIBW_BUILD')
936944
log(f'{CIBW_BUILD=}')
937945
if CIBW_BUILD is None:
938-
if cibw_pyodide:
946+
if graal:
947+
CIBW_BUILD = 'gp*'
948+
env_extra['CIBW_ENABLE'] = 'graalpy'
949+
elif cibw_pyodide:
939950
# Using python-3.13 fixes problems with MuPDF's setjmp/longjmp.
940951
CIBW_BUILD = 'cp313*'
941952
elif os.environ.get('GITHUB_ACTIONS') == 'true':

0 commit comments

Comments
 (0)