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.

86 lines
2.5 KiB

4 years ago
Index: PyMuPDF-1.19.6/setup.py
4 years ago
--- PyMuPDF-1.19.6/setup.py.orig 2022-02-18 14:31:42.000000000 +0100
+++ PyMuPDF-1.19.6/setup.py 2022-05-25 23:41:44.157605000 +0200
4 years ago
@@ -78,62 +78,12 @@
5 years ago
return LIBRARIES[os_id]
4 years ago
5 years ago
-# check the platform
-if sys.platform.startswith("linux") or "gnu" in sys.platform:
4 years ago
- include_dirs = [
- "/usr/include/mupdf",
- "/usr/local/include/mupdf",
- "mupdf/thirdparty/freetype/include",
- "/usr/include/freetype2",
- ]
- libraries = load_libraries()
- library_dirs = []
- extra_link_args = []
-
4 years ago
-elif sys.platform.startswith(("darwin", "freebsd", "openbsd")):
4 years ago
- 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 = []
-
5 years ago
-
-else:
4 years ago
- 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,
-)
5 years ago
+ include_dirs=[ "@l_prefix@/include/mupdf", "@l_prefix@/include/freetype", "@l_prefix@/include", ],
+ library_dirs=[ "@l_prefix@/lib/", ],
+ libraries=[ "mupdf", "mupdf-third", ])
4 years ago
setup_py_cwd = os.path.dirname(__file__)
classifiers = [
4 years ago
Index: pdfrw-0.4/pdfrw/crypt.py
--- pdfrw-0.4/pdfrw/crypt.py.orig 2017-09-14 15:27:27.000000000 +0200
+++ pdfrw-0.4/pdfrw/crypt.py 2022-05-25 23:47:27.773407000 +0200
@@ -7,11 +7,7 @@
import hashlib
import struct
-try:
- from Crypto.Cipher import ARC4, AES
- HAS_CRYPTO = True
-except ImportError:
- HAS_CRYPTO = False
+HAS_CRYPTO = False
from .objects import PdfDict, PdfName