2 changed files with 75 additions and 2 deletions
@ -0,0 +1,73 @@
|
||||
Index: PyMuPDF-1.18.9/setup.py
|
||||
--- PyMuPDF-1.18.9/setup.py.orig 2021-02-27 09:32:15.856443000 +0100
|
||||
+++ PyMuPDF-1.18.9/setup.py 2021-02-27 09:38:18.214639000 +0100
|
||||
@@ -52,63 +52,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",
|
||||
- ],
|
||||
- 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"],
|
||||
- # 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 = []
|
Loading…
Reference in new issue