summaryrefslogtreecommitdiff
path: root/media-gfx/img2pdf/img2pdf-0.4.0.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-29 18:03:51 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-29 18:03:51 +0000
commitd7ed2b01311f15ba54fe8ea872aab7d59ab2b193 (patch)
tree1814dd2b5bbf2e7639fdafbeef48d228cfaf5e9b /media-gfx/img2pdf/img2pdf-0.4.0.ebuild
parentabaa75b10f899ada8dd05b23cc03205064394bc6 (diff)
gentoo resync : 29.01.2021
Diffstat (limited to 'media-gfx/img2pdf/img2pdf-0.4.0.ebuild')
-rw-r--r--media-gfx/img2pdf/img2pdf-0.4.0.ebuild50
1 files changed, 50 insertions, 0 deletions
diff --git a/media-gfx/img2pdf/img2pdf-0.4.0.ebuild b/media-gfx/img2pdf/img2pdf-0.4.0.ebuild
new file mode 100644
index 000000000000..aeda8aad1be4
--- /dev/null
+++ b/media-gfx/img2pdf/img2pdf-0.4.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit distutils-r1
+
+DESCRIPTION="Losslessly convert raster images to PDF"
+HOMEPAGE="https://gitlab.mister-muffin.de/josch/img2pdf"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="gui"
+
+# missing dev-python/pdfrw dependency and
+# require old version of imagemagick
+# waiting new version
+RESTRICT="test"
+
+#BDEPEND="test? (
+# dev-python/numpy[${PYTHON_USEDEP}]
+# dev-python/pdfrw[${PYTHON_USEDEP}]
+# dev-python/pikepdf[${PYTHON_USEDEP}]
+# dev-python/pytest[${PYTHON_USEDEP}]
+# dev-python/scipy[${PYTHON_USEDEP}]
+# <media-gfx/imagemagick-7.0.0[jpeg,jpeg2k,png,q8,q32,tiff]
+#)"
+RDEPEND="dev-python/pikepdf[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ gui? ( $(python_gen_impl_dep tk) )"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ distutils-r1_python_prepare_all
+
+ # Remove gui executable if there's no demand/support for it.
+ if ! use gui; then
+ sed -i '/gui_scripts/d' setup.py || die
+ fi
+}
+
+python_test() {
+ pytest -vv src/img2pdf_test.py || die "Tests fail with ${EPYTHON}"
+}