aboutsummaryrefslogtreecommitdiff
path: root/textproc/py-pikepdf
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2019-07-11 16:21:00 +0000
committerKai Knoblich <kai@FreeBSD.org>2019-07-11 16:21:00 +0000
commit3ccb7b78b4e02608241dbb6140d9ce9f2998ddc4 (patch)
treed330ecfce4a6b5323e17580dc1e08754f5063f9a /textproc/py-pikepdf
parentd513ecb52c5ddaee73307c27ff61b84bb104d7ce (diff)
downloadports-3ccb7b78b4e02608241dbb6140d9ce9f2998ddc4.tar.gz
ports-3ccb7b78b4e02608241dbb6140d9ce9f2998ddc4.zip
New port: textproc/py-pikepdf
pikepdf is a Python library for reading and writing PDF files. It's based on QPDF, a powerful PDF manipulation and repair library. pikepdf is similar to PyPDF2 and pdfrw - it provides low level access to PDF features and allows editing and content transformation of existing PDFs. Some knowledge of the PDF specification may be helpful. It does not have the capability to render a PDF to image. WWW: https://github.com/pikepdf/pikepdf
Notes
Notes: svn path=/head/; revision=506412
Diffstat (limited to 'textproc/py-pikepdf')
-rw-r--r--textproc/py-pikepdf/Makefile38
-rw-r--r--textproc/py-pikepdf/distinfo3
-rw-r--r--textproc/py-pikepdf/pkg-descr10
3 files changed, 51 insertions, 0 deletions
diff --git a/textproc/py-pikepdf/Makefile b/textproc/py-pikepdf/Makefile
new file mode 100644
index 000000000000..e373bb8016c0
--- /dev/null
+++ b/textproc/py-pikepdf/Makefile
@@ -0,0 +1,38 @@
+# $FreeBSD$
+
+PORTNAME= pikepdf
+DISTVERSION= 1.3.0
+CATEGORIES= textproc python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= kai@FreeBSD.org
+COMMENT= Read and write PDFs with Python, powered by qpdf
+
+LICENSE= MPL20
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pybind11>=2.2.4,<3:devel/py-pybind11@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools_scm_git_archive>0:devel/py-setuptools_scm_git_archive@${PY_FLAVOR}
+LIB_DEPENDS= libqpdf.so:print/qpdf
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}lxml>=4.0:devel/py-lxml@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}attrs>=17.4.0:devel/py-attrs@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}hypothesis>=4.16,<5:devel/py-hypothesis@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest>=4.4.0,<5:devel/py-pytest@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-helpers-namespace>=2019.1.8:devel/py-pytest-helpers-namespace@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-timeout>=1.3.3:devel/py-pytest-timeout@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-xdist>=1.28,<2:devel/py-pytest-xdist@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pillow>=5.0.0:graphics/py-pillow@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}python-xmp-toolkit>=2.0.1:textproc/py-python-xmp-toolkit@${PY_FLAVOR}
+
+USES= python:3.5+
+USE_PYTHON= distutils autoplist
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/pikepdf/_qpdf.so
+
+do-test:
+ @(cd ${WRKSRC} && ${SETENV} LC_ALL=en_US.UTF-8 ${PYTHON_CMD} -m pytest -v )
+
+.include <bsd.port.mk>
diff --git a/textproc/py-pikepdf/distinfo b/textproc/py-pikepdf/distinfo
new file mode 100644
index 000000000000..d0a1e45e51e1
--- /dev/null
+++ b/textproc/py-pikepdf/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1562859319
+SHA256 (pikepdf-1.3.0.tar.gz) = f6db680c47e01ab23ee813d7c0e2bc50469a6a9f4a33414e961d07cdec0ed541
+SIZE (pikepdf-1.3.0.tar.gz) = 1580729
diff --git a/textproc/py-pikepdf/pkg-descr b/textproc/py-pikepdf/pkg-descr
new file mode 100644
index 000000000000..41f50a5dbb23
--- /dev/null
+++ b/textproc/py-pikepdf/pkg-descr
@@ -0,0 +1,10 @@
+pikepdf is a Python library for reading and writing PDF files. It's based on
+QPDF, a powerful PDF manipulation and repair library.
+
+pikepdf is similar to PyPDF2 and pdfrw - it provides low level access to PDF
+features and allows editing and content transformation of existing PDFs.
+
+Some knowledge of the PDF specification may be helpful. It does not have the
+capability to render a PDF to image.
+
+WWW: https://github.com/pikepdf/pikepdf