From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C2A36138350 for ; Mon, 20 Apr 2020 07:42:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CB32DE0A89; Mon, 20 Apr 2020 07:42:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 78C68E0A89 for ; Mon, 20 Apr 2020 07:42:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 22D5334F010 for ; Mon, 20 Apr 2020 07:42:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 80DAD1D7 for ; Mon, 20 Apr 2020 07:42:03 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1587368497.e5dbb054e384b53631834798266606d31cb2e222.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pdfrw/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pdfrw/Manifest dev-python/pdfrw/pdfrw-0.4.ebuild X-VCS-Directories: dev-python/pdfrw/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: e5dbb054e384b53631834798266606d31cb2e222 X-VCS-Branch: master Date: Mon, 20 Apr 2020 07:42:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fc08cb90-85dd-4369-9ca9-01983db0bc0e X-Archives-Hash: 345ad03977a1f0287c305f6de8188713 commit: e5dbb054e384b53631834798266606d31cb2e222 Author: Michał Górny gentoo org> AuthorDate: Mon Apr 20 06:45:06 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Apr 20 07:41:37 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5dbb054 dev-python/pdfrw: Enable tests Signed-off-by: Michał Górny gentoo.org> dev-python/pdfrw/Manifest | 1 + dev-python/pdfrw/pdfrw-0.4.ebuild | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/dev-python/pdfrw/Manifest b/dev-python/pdfrw/Manifest index fdc7338493f..b435bb703dc 100644 --- a/dev-python/pdfrw/Manifest +++ b/dev-python/pdfrw/Manifest @@ -1 +1,2 @@ DIST pdfrw-0.4.tar.gz 95402 BLAKE2B 00f01f8d4cca9c5306d08094639d4cb10c53aca1c81b6c65f5639c8862a067e562c164523cc58abddb06b39dabcc50c2fbcdcf04a291309cac709cbfd0cf4673 SHA512 6c0b629e837f9bd479a288bcd040952b98920da345113bf90167becbdf2f90a9d6c082c5e7988c68118bd62a2a5a0d22f98523407996531bb5d3031e847e10b0 +DIST pdfrw-static_pdfs-d646009a0e3e71daf13a52ab1029e2230920ebf4.tar.gz 25243391 BLAKE2B 5c491d56c9731352907787bbe10b8b3ac362f0c7892ddcd15a1299d3b2b4bb604662f6231aa22478290992a345e769af2e2c2459a25a16c370ea05fa68101f80 SHA512 9bf1d5ddc8f55b40b50041e745579406bb0036fb7795ac40064aad7cdf592869051ba84a5ab080042e237690bb2f1811b86b2a4424535aa4c367f6e29a0c34eb diff --git a/dev-python/pdfrw/pdfrw-0.4.ebuild b/dev-python/pdfrw/pdfrw-0.4.ebuild index 8a587df5767..3c4fb0e43fe 100644 --- a/dev-python/pdfrw/pdfrw-0.4.ebuild +++ b/dev-python/pdfrw/pdfrw-0.4.ebuild @@ -7,13 +7,44 @@ PYTHON_COMPAT=( python2_7 python3_6 ) 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="" -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:dd41b0104f185206b51e7ffe5b07d261:skip:' \ + -i tests/expected.txt || die + + distutils-r1_src_prepare +} + +src_test() { + cd tests || die + distutils-r1_src_test +}