diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-01-29 18:03:51 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-01-29 18:03:51 +0000 |
commit | d7ed2b01311f15ba54fe8ea872aab7d59ab2b193 (patch) | |
tree | 1814dd2b5bbf2e7639fdafbeef48d228cfaf5e9b /dev-python/pdfrw/pdfrw-0.4_p1.ebuild | |
parent | abaa75b10f899ada8dd05b23cc03205064394bc6 (diff) |
gentoo resync : 29.01.2021
Diffstat (limited to 'dev-python/pdfrw/pdfrw-0.4_p1.ebuild')
-rw-r--r-- | dev-python/pdfrw/pdfrw-0.4_p1.ebuild | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/dev-python/pdfrw/pdfrw-0.4_p1.ebuild b/dev-python/pdfrw/pdfrw-0.4_p1.ebuild new file mode 100644 index 000000000000..00a4ad7b5a1c --- /dev/null +++ b/dev-python/pdfrw/pdfrw-0.4_p1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit distutils-r1 + +PDFS_COMMIT=d646009a0e3e71daf13a52ab1029e2230920ebf4 +DESCRIPTION="PDF file reader/writer library" +HOMEPAGE="https://github.com/pmaupin/pdfrw" + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/sarnold/hexdump.git" + EGIT_BRANCH="main" + inherit git-r3 + KEYWORDS="" +else + MY_PV="${PV/_p/-}" + MY_P="${PN}-${MY_PV}" + SRC_URI="https://github.com/sarnold/${PN}/archive/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.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 test" + +BDEPEND="dev-python/pillow[${PYTHON_USEDEP}] + crypt? ( dev-python/pycryptodome[${PYTHON_USEDEP}] ) + test? ( dev-python/reportlab[${PYTHON_USEDEP}] + >=dev-python/pytest-3.0.3[${PYTHON_USEDEP}] )" + +RESTRICT="!test? ( test )" + +# 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() { + # broken upstream (sensitive to reportlab version?) + #sed -e 's:test_rl1_platypus:_&:' \ + # -i tests/test_examples.py || die + eapply "${FILESDIR}/pdfrw-fix-import-collections-warning.patch" + use test && eapply "${FILESDIR}/pdfrw-static-fix-import-collections-warning.patch" + + distutils-r1_src_prepare +} |