Browse Source

update module

master
parent
commit
54460acf86
  1. 73
      python-pdf/python-pdf.patch
  2. 4
      python-pdf/python-pdf.spec

73
python-pdf/python-pdf.patch

@ -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 = []

4
python-pdf/python-pdf.spec

@ -28,7 +28,7 @@
%define V_pypdf2 1.26.0
%define V_papersize 1.0.1
%define V_pdfrw 0.4
%define V_pymupdf 1.18.8
%define V_pymupdf 1.18.9
# package information
Name: python-pdf
@ -41,7 +41,7 @@ Class: BASE
Group: Language
License: GPL
Version: %{V_python}
Release: 20210206
Release: 20210227
# list of sources
Source0: https://files.pythonhosted.org/packages/source/r/reportlab/reportlab-%{V_reportlab}.tar.gz

Loading…
Cancel
Save