diff options
Diffstat (limited to 'dev-python/pdfrw')
-rw-r--r-- | dev-python/pdfrw/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pdfrw/pdfrw-0.4.ebuild | 46 |
2 files changed, 42 insertions, 7 deletions
diff --git a/dev-python/pdfrw/Manifest b/dev-python/pdfrw/Manifest index f355f840c398..52f1d6a72571 100644 --- a/dev-python/pdfrw/Manifest +++ b/dev-python/pdfrw/Manifest @@ -1,3 +1,4 @@ DIST pdfrw-0.4.tar.gz 95402 BLAKE2B 00f01f8d4cca9c5306d08094639d4cb10c53aca1c81b6c65f5639c8862a067e562c164523cc58abddb06b39dabcc50c2fbcdcf04a291309cac709cbfd0cf4673 SHA512 6c0b629e837f9bd479a288bcd040952b98920da345113bf90167becbdf2f90a9d6c082c5e7988c68118bd62a2a5a0d22f98523407996531bb5d3031e847e10b0 -EBUILD pdfrw-0.4.ebuild 461 BLAKE2B 5dbe6d5ddece1ef7802ae68a54797b46553d105cb25f8e01b89da297631a33e8152851f3f4a16b91cc5d286638e2d1835a2158868ea1ef8798b65439420f3a36 SHA512 01408d9dcb4775cba5c7aebe570644c78069f7180bae6927408a734034174c0b6ccdbde9d12b199d2c1b43162281bec868a3104aa263800246bd23cc03f0c59f +DIST pdfrw-static_pdfs-d646009a0e3e71daf13a52ab1029e2230920ebf4.tar.gz 25243391 BLAKE2B 5c491d56c9731352907787bbe10b8b3ac362f0c7892ddcd15a1299d3b2b4bb604662f6231aa22478290992a345e769af2e2c2459a25a16c370ea05fa68101f80 SHA512 9bf1d5ddc8f55b40b50041e745579406bb0036fb7795ac40064aad7cdf592869051ba84a5ab080042e237690bb2f1811b86b2a4424535aa4c367f6e29a0c34eb +EBUILD pdfrw-0.4.ebuild 1301 BLAKE2B 3db7ad38af574cbca6444a0049c11f1c77729c527a90e96a15f71e56a42622b354dd6dc82f9268d6494adcd52df5d64da54e0da7fa130b10093f8886b8ea9d3a SHA512 f3860a5e132346e2e4e3bd85dd8bebd3ad0bcbce6c9db79992ddfb7b4311e8b979e39b160490261cc8debc5103f63084e4e4becacacbd85dc9340a35ca441444 MISC metadata.xml 385 BLAKE2B cf7129e00db7c2007cd7a8d709eeb586608aecbbf0fec49a89ead9fa5fad8b1148d3095cd7c17773c7a113fea5635bbd54f36606f6039d603eaf82efe037aa11 SHA512 cba6642b2a17114e0f342bb8773aff508e04e79a2c67f32bf3d713ffeaa47ad8ad5a957412ed215893bfe341243e8555f7bf086370fe392f569b79d9738c66f8 diff --git a/dev-python/pdfrw/pdfrw-0.4.ebuild b/dev-python/pdfrw/pdfrw-0.4.ebuild index 8a587df57675..9a00f180cbc5 100644 --- a/dev-python/pdfrw/pdfrw-0.4.ebuild +++ b/dev-python/pdfrw/pdfrw-0.4.ebuild @@ -1,19 +1,53 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -PYTHON_COMPAT=( python2_7 python3_6 ) +PYTHON_COMPAT=( python3_{6,7,8} ) inherit distutils-r1 +PDFS_COMMIT=d646009a0e3e71daf13a52ab1029e2230920ebf4 DESCRIPTION="PDF file reader/writer library" HOMEPAGE="https://github.com/pmaupin/pdfrw" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz + test? ( + https://github.com/pmaupin/static_pdfs/archive/${PDFS_COMMIT}.tar.gz + -> pdfrw-static_pdfs-${PDFS_COMMIT}.tar.gz + )" LICENSE="BSD MIT" SLOT="0" -KEYWORDS="~alpha amd64 arm ~arm64 hppa ppc ppc64 sparc x86" -IUSE="" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 sparc x86" -DEPEND="dev-python/setuptools[${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}"/* "${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 + # fails with py3 + sed -e '/repaginate\/7037/s:[0-9a-f]*$:skip:' \ + -e '/.*\/72eb/s:[0-9a-f]*$:skip:' \ + -i tests/expected.txt || die + # fix py3.7+ some + sed -i -e 's:raise StopIteration:return:' pdfrw/tokens.py || die + + distutils-r1_src_prepare +} + +src_test() { + cd tests || die + distutils-r1_src_test +} |