|
|
|
|
Index: PyMuPDF-1.18.16/setup.py
|
|
|
|
|
--- PyMuPDF-1.18.16/setup.py.orig 2021-07-11 09:42:30.402082000 +0200
|
|
|
|
|
+++ PyMuPDF-1.18.16/setup.py 2021-07-11 09:45:34.873739000 +0200
|
|
|
|
|
@@ -69,64 +69,12 @@
|
|
|
|
|
return LIBRARIES["default"]
|
|
|
|
|
return LIBRARIES[os_id]
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-# check the platform
|
|
|
|
|
-if sys.platform.startswith("linux") or "gnu" in sys.platform:
|
|
|
|
|
- module = Extension(
|
|
|
|
|
- "fitz._fitz", # name of the module
|
|
|
|
|
- ["fitz/fitz_wrap.c"], # C source file
|
|
|
|
|
- include_dirs=[ # we need the path of the MuPDF headers
|
|
|
|
|
- "/usr/include/mupdf",
|
|
|
|
|
- "/usr/local/include/mupdf",
|
|
|
|
|
- "mupdf/thirdparty/freetype/include",
|
|
|
|
|
- "/usr/include/freetype2",
|
|
|
|
|
- ],
|
|
|
|
|
- libraries=load_libraries(),
|
|
|
|
|
- )
|
|
|
|
|
-elif sys.platform.startswith(("darwin", "freebsd")):
|
|
|
|
|
- module = Extension(
|
|
|
|
|
- "fitz._fitz", # name of the module
|
|
|
|
|
- ["fitz/fitz_wrap.c"], # C source file
|
|
|
|
|
- # directories containing mupdf's header files
|
|
|
|
|
- include_dirs=[
|
|
|
|
|
- "/usr/local/include/mupdf",
|
|
|
|
|
- "/usr/local/include",
|
|
|
|
|
- "mupdf/thirdparty/freetype/include",
|
|
|
|
|
- ],
|
|
|
|
|
- # libraries should already be linked here by brew
|
|
|
|
|
- library_dirs=["/usr/local/lib", "/opt/homebrew/lib"],
|
|
|
|
|
- # library_dirs=['/usr/local/Cellar/mupdf-tools/1.8/lib/',
|
|
|
|
|
- # '/usr/local/Cellar/openssl/1.0.2g/lib/',
|
|
|
|
|
- # '/usr/local/Cellar/jpeg/8d/lib/',
|
|
|
|
|
- # '/usr/local/Cellar/freetype/2.6.3/lib/',
|
|
|
|
|
- # '/usr/local/Cellar/jbig2dec/0.12/lib/'
|
|
|
|
|
- # ],
|
|
|
|
|
- libraries=["mupdf", "mupdf-third"],
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
-else:
|
|
|
|
|
- # ===============================================================================
|
|
|
|
|
- # Build / set up PyMuPDF under Windows
|
|
|
|
|
- # ===============================================================================
|
|
|
|
|
- module = Extension(
|
|
|
|
|
- "fitz._fitz",
|
|
|
|
|
- include_dirs=[ # we need the path of the MuPDF's headers
|
|
|
|
|
- "./mupdf/include",
|
|
|
|
|
- "./mupdf/include/mupdf",
|
|
|
|
|
- "./mupdf/thirdparty/freetype/include",
|
|
|
|
|
- ],
|
|
|
|
|
- libraries=[ # these are needed in Windows
|
|
|
|
|
- "libmupdf",
|
|
|
|
|
- "libresources",
|
|
|
|
|
- "libthirdparty",
|
|
|
|
|
- ],
|
|
|
|
|
- extra_link_args=["/NODEFAULTLIB:MSVCRT"],
|
|
|
|
|
- # x86 dir of libmupdf.lib etc.
|
|
|
|
|
- library_dirs=["./mupdf/platform/win32/Release"],
|
|
|
|
|
- # x64 dir of libmupdf.lib etc.
|
|
|
|
|
- # library_dirs=['./mupdf/platform/win32/x64/Release'],
|
|
|
|
|
- sources=["./fitz/fitz_wrap.c"],
|
|
|
|
|
- )
|
|
|
|
|
+module = Extension(
|
|
|
|
|
+ "fitz._fitz",
|
|
|
|
|
+ ["fitz/fitz_wrap.c"],
|
|
|
|
|
+ include_dirs=[ "@l_prefix@/include/mupdf", "@l_prefix@/include/freetype", "@l_prefix@/include", ],
|
|
|
|
|
+ library_dirs=[ "@l_prefix@/lib/", ],
|
|
|
|
|
+ libraries=[ "mupdf", "mupdf-third", ])
|
|
|
|
|
|
|
|
|
|
pkg_tab = open("PKG-INFO", "rb").read().splitlines()
|
|
|
|
|
long_dtab = [] # long description lines
|