Skip to content

Commit 36d1b66

Browse files
setup.py: with graal, force rerun of swig.
We do two builds with graal, and mupdf/scripts/wrap does not know to rerun swig because inputs and command are unchanged, and swig binary is not necessarily newer.
1 parent 409ffde commit 36d1b66

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,12 @@ def build_mupdf_unix(
10231023
if PYMUPDF_SETUP_SWIG:
10241024
command += f' --swig {shlex.quote(PYMUPDF_SETUP_SWIG)}'
10251025
command += f' -d build/{build_prefix}{build_type} -b'
1026-
#command += f' --m-target libs'
1026+
if sys.implementation.name == 'graalpy':
1027+
# Force rerun of swig.
1028+
pipcl.run(f'ls -l {mupdf_local}/platform/python/')
1029+
for p in glob.glob(f'{mupdf_local}/platform/python/mupdfcpp*.i.cpp'):
1030+
pipcl.log(f'Graal, deleting: {p!r}')
1031+
pipcl.fs_remove(p)
10271032
if PYMUPDF_SETUP_MUPDF_REFCHECK_IF:
10281033
command += f' --refcheck-if "{PYMUPDF_SETUP_MUPDF_REFCHECK_IF}"'
10291034
if PYMUPDF_SETUP_MUPDF_TRACE_IF:

0 commit comments

Comments
 (0)