You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.2 KiB
69 lines
2.2 KiB
Index: PyMuPDF-1.19.4/setup.py |
|
--- PyMuPDF-1.19.4/setup.py.orig 2021-10-24 11:14:26.882131000 +0200 |
|
+++ PyMuPDF-1.19.4/setup.py 2021-10-24 11:15:46.641458000 +0200 |
|
@@ -78,62 +78,12 @@ |
|
return LIBRARIES[os_id] |
|
|
|
|
|
-# check the platform |
|
-if sys.platform.startswith("linux") or "gnu" in sys.platform: |
|
- include_dirs = [ |
|
- "/usr/include/mupdf", |
|
- "/usr/local/include/mupdf", |
|
- "mupdf/thirdparty/freetype/include", |
|
- "/usr/include/freetype2", |
|
- ] |
|
- libraries = load_libraries() |
|
- library_dirs = [] |
|
- extra_link_args = [] |
|
- |
|
-elif sys.platform.startswith(("darwin", "freebsd", "openbsd")): |
|
- include_dirs = [ |
|
- "/usr/local/include/mupdf", |
|
- "/usr/local/include", |
|
- "mupdf/thirdparty/freetype/include", |
|
- "/usr/local/include/freetype2", |
|
- "/usr/X11R6/include/freetype2", |
|
- "/opt/homebrew/include", |
|
- "/opt/homebrew/include/mupdf", |
|
- "/opt/homebrew/include/freetype2", |
|
- ] |
|
- libraries = ["mupdf", "mupdf-third"] |
|
- library_dirs = ["/usr/local/lib", "/opt/homebrew/lib"] |
|
- extra_link_args = [] |
|
- |
|
- |
|
-else: |
|
- include_dirs = [ |
|
- "./mupdf/include", |
|
- "./mupdf/include/mupdf", |
|
- "./mupdf/thirdparty/freetype/include", |
|
- ] |
|
- libraries = ["libmupdf", "libresources", "libthirdparty"] |
|
- library_dirs = ["./mupdf/platform/win32/x64/Release"] |
|
- extra_link_args = ["/NODEFAULTLIB:MSVCRT"] |
|
- |
|
-# add any local include and library folders |
|
-pymupdf_dirs = os.environ.get("PYMUPDF_DIRS", None) |
|
-if pymupdf_dirs: |
|
- with open(pymupdf_dirs) as dirfile: |
|
- local_dirs = json.load(dirfile) |
|
- include_dirs += local_dirs.get("include_dirs", []) |
|
- library_dirs += local_dirs.get("library_dirs", []) |
|
- |
|
- |
|
module = Extension( |
|
"fitz._fitz", |
|
["fitz/fitz_wrap.c"], |
|
- language="c++", |
|
- include_dirs=include_dirs, |
|
- library_dirs=library_dirs, |
|
- libraries=libraries, |
|
- extra_link_args=extra_link_args, |
|
-) |
|
+ include_dirs=[ "@l_prefix@/include/mupdf", "@l_prefix@/include/freetype", "@l_prefix@/include", ], |
|
+ library_dirs=[ "@l_prefix@/lib/", ], |
|
+ libraries=[ "mupdf", "mupdf-third", ]) |
|
|
|
setup_py_cwd = os.path.dirname(__file__) |
|
classifiers = [
|
|
|