summaryrefslogtreecommitdiff
path: root/dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-07 22:21:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-07 22:21:54 +0000
commit06dcf64674a43718324bffee383625d2cd050b75 (patch)
tree4de58e857f3f0718fef4fc386e42577c2f4c9478 /dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild
parent198bd0cd3c1be97f7deb5283fa00048718482de4 (diff)
gentoo auto-resync : 07:11:2023 - 22:21:54
Diffstat (limited to 'dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild')
-rw-r--r--dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild67
1 files changed, 67 insertions, 0 deletions
diff --git a/dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild b/dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild
new file mode 100644
index 000000000000..957493f44d34
--- /dev/null
+++ b/dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+PDFS_COMMIT=d646009a0e3e71daf13a52ab1029e2230920ebf4
+DESCRIPTION="PDF file reader/writer library"
+HOMEPAGE="
+ https://github.com/sarnold/pdfrw/
+ https://pypi.org/project/pdfrw/
+"
+
+if [[ ${PV} = 9999* ]]; then
+ EGIT_REPO_URI="https://github.com/sarnold/pdfrw.git"
+ EGIT_BRANCH="main"
+ inherit git-r3
+else
+ MY_PV="${PV/_p/-}"
+ MY_P="${PN}-${MY_PV}"
+ SRC_URI="
+ https://github.com/sarnold/pdfrw/archive/${MY_PV}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+ test? (
+ https://github.com/pmaupin/static_pdfs/archive/${PDFS_COMMIT}.tar.gz
+ -> pdfrw-static_pdfs-${PDFS_COMMIT}.tar.gz
+ )
+ "
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+ S=${WORKDIR}/${MY_P}
+fi
+
+LICENSE="BSD MIT"
+SLOT="0"
+IUSE="crypt"
+
+RDEPEND="
+ crypt? (
+ dev-python/pycryptodome[${PYTHON_USEDEP}]
+ )
+"
+BDEPEND="
+ test? (
+ dev-python/reportlab[${PYTHON_USEDEP}]
+ )
+"
+
+# unittest would be sufficient but its output is unreadable
+distutils_enable_tests pytest
+
+src_unpack() {
+ default
+ if use test; then
+ mv "static_pdfs-${PDFS_COMMIT}"/* "${MY_P}"/tests/static_pdfs || die
+ fi
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/pdfrw-fix-import-collections-warning.patch"
+ eapply "${FILESDIR}/pdfrw-static-fix-import-collections-warning.patch"
+
+ distutils-r1_src_prepare
+}