File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -756,7 +756,10 @@ def build_mupdf_windows(
756756 tesseract = '' if os .environ .get ('PYMUPDF_SETUP_MUPDF_TESSERACT' ) == '0' else 'tesseract-'
757757 windows_build_tail = f'build\\ shared-{ tesseract } { build_type } '
758758 if g_py_limited_api :
759- windows_build_tail += f'-Py_LIMITED_API={ pipcl .current_py_limited_api ()} '
759+ if get_mupdf_version (mupdf_local ) >= (1 , 24 , 11 ):
760+ windows_build_tail += f'-Py_LIMITED_API_{ pipcl .current_py_limited_api ()} '
761+ else :
762+ windows_build_tail += f'-Py_LIMITED_API={ pipcl .current_py_limited_api ()} '
760763 windows_build_tail += f'-x{ wp .cpu .bits } -py{ wp .version } '
761764 windows_build_dir = f'{ mupdf_local } \\ { windows_build_tail } '
762765 #log( f'Building mupdf.')
@@ -901,7 +904,10 @@ def build_mupdf_unix(
901904 build_prefix += 'bsymbolic-'
902905 log (f'{ g_py_limited_api = } ' )
903906 if g_py_limited_api :
904- build_prefix += f'Py_LIMITED_API={ pipcl .current_py_limited_api ()} -'
907+ if get_mupdf_version (mupdf_local ) >= (1 , 24 , 11 ):
908+ build_prefix += f'Py_LIMITED_API_{ pipcl .current_py_limited_api ()} -'
909+ else :
910+ build_prefix += f'Py_LIMITED_API={ pipcl .current_py_limited_api ()} -'
905911 unix_build_dir = f'{ mupdf_local } /build/{ build_prefix } { build_type } '
906912 # We need MuPDF's Python bindings, so we build MuPDF with
907913 # `mupdf/scripts/mupdfwrap.py` instead of running `make`.
You can’t perform that action at this time.
0 commit comments