Skip to content

Commit 94eb309

Browse files
scripts/test.py:cibuildwheel(): avoid duplicate test runs if only one python version.
1 parent 6810b3d commit 94eb309

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/test.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,9 +927,12 @@ def cibuildwheel(
927927
# will notice that the wheel we built above supports all versions of
928928
# Python, so will not actually do any builds here.
929929
#
930-
env_extra['CIBW_BUILD'] = CIBW_BUILD
931-
run(f'cd {pymupdf_dir} && cibuildwheel{cibw_pyodide_args}', env_extra=env_extra)
932-
run(f'ls -ld {pymupdf_dir}/wheelhouse/*')
930+
# We only do this if there are more than one Python versions. This still
931+
# duplicates the testing of the first python version.
932+
if len(CIBW_BUILD.split()) > 1:
933+
env_extra['CIBW_BUILD'] = CIBW_BUILD
934+
run(f'cd {pymupdf_dir} && cibuildwheel{cibw_pyodide_args}', env_extra=env_extra)
935+
run(f'ls -ld {pymupdf_dir}/wheelhouse/*')
933936

934937

935938
def cibw_do_test_project(env_extra, CIBW_BUILD, cibw_pyodide, cibw_pyodide_args):

0 commit comments

Comments
 (0)