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 896051382C5 for ; Tue, 22 Jun 2021 02:27:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BB4E8E0829; Tue, 22 Jun 2021 02:27:23 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 8E887E0829 for ; Tue, 22 Jun 2021 02:27:23 +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 967A3340836 for ; Tue, 22 Jun 2021 02:27:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 943FA7A1 for ; Tue, 22 Jun 2021 02:27:20 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1624328619.9be12e004d03f9471d9b688c6d1ff9a8412a5f2c.zmedico@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/agate-dbf/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/agate-dbf/Manifest dev-python/agate-dbf/agate-dbf-0.2.2.ebuild X-VCS-Directories: dev-python/agate-dbf/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 9be12e004d03f9471d9b688c6d1ff9a8412a5f2c X-VCS-Branch: master Date: Tue, 22 Jun 2021 02:27:20 +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: ea1fba9f-955d-4aaa-9bc7-8652fcbb2875 X-Archives-Hash: 42f7a9f4b0272f08038e169e5c159f9f commit: 9be12e004d03f9471d9b688c6d1ff9a8412a5f2c Author: Zac Medico gentoo org> AuthorDate: Tue Jun 22 02:11:44 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Jun 22 02:23:39 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9be12e00 dev-python/agate-dbf: Enable unit tests (bug 797376) tests/test_table.py::TestDBF::test_from_dbf PASSED [100%] Closes: https://bugs.gentoo.org/797376 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Zac Medico gentoo.org> dev-python/agate-dbf/Manifest | 3 +++ dev-python/agate-dbf/agate-dbf-0.2.2.ebuild | 41 ++++++++++++++++++++++++++--- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/dev-python/agate-dbf/Manifest b/dev-python/agate-dbf/Manifest index 455e50e3c9d..e4b2d936f79 100644 --- a/dev-python/agate-dbf/Manifest +++ b/dev-python/agate-dbf/Manifest @@ -1 +1,4 @@ DIST agate-dbf-0.2.2.tar.gz 2863 BLAKE2B 112b03e1a02b70e63f77195a999a60a59b4e02af55da2b9d94e9d535f557c4193129dcb8ce3f91d93cbc6e19196705009574e3b9e5073f9934d00636bb4b2abd SHA512 3e99404dfcd521010bc3eb5899871dfc63581e03604f80b0a42d4db48f486137fd48685024decd380d346ac5c2089a0d19dd9229893e8d5337b9bd9d7b4eb3b6 +DIST agate-dbf-0.2.2_examples%2Ftest.dbf 1314 BLAKE2B 81d5507b88fe7f7c3866d8666feff12bf3b14451affd653d76239f8785037c908509de248ac4bc8dbebeba4b1a84d69a48bf97b83716fe489ceb39f8ccf0e935 SHA512 460f9a624a6fed58d1fe0484ff6f7fa081d595d8f1a04f4f449ef6de037e334abb9da0403622e5af8c7914e02cda2fa38c4058ef1bb650e59e50584b9ae73b2e +DIST agate-dbf-0.2.2_examples%2Ftestdbf_converted.csv 896 BLAKE2B fe535d9b784088118fcd61b5378d49d92bac801be61e7900200625f267c8f9c454729376b292d809d3e6a6ee2a093e2a813524ff9199223cbc89a9a461feed40 SHA512 ddba24038d4500b97ff8b11b03a5260927a299f1732aa0a6bcb4746c52e04825f2f3d5d211141576736008ff7f56d0970b21c06f4afad53a4e4e0a873815516b +DIST agate-dbf-0.2.2_tests%2Ftest_table.py 574 BLAKE2B 22a744ae20491632795a0b654d8ab1e8adc090d43d0a18352b83cfc1687c57d33f1159d96cb379743d293203412dbbbaae8c33be195ae9d868584671ff0ea74d SHA512 131d8a553bc9c7538959e1ae29b62c47cea3e14365afca4e92e4f36cc8dab7e4b00efa462db5e9ca0f51b5e3eda892cf91881d65bd1302fa80bd5b0f66fa4076 diff --git a/dev-python/agate-dbf/agate-dbf-0.2.2.ebuild b/dev-python/agate-dbf/agate-dbf-0.2.2.ebuild index 40f14f91612..772d11bd4f5 100644 --- a/dev-python/agate-dbf/agate-dbf-0.2.2.ebuild +++ b/dev-python/agate-dbf/agate-dbf-0.2.2.ebuild @@ -13,10 +13,45 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" -IUSE="" -RDEPEND="" +IUSE="test +xml" +RESTRICT="!test? ( test )" +# Other packages have BDEPEND="test? ( dev-python/agate-dbf[xml] )" +AGATE_VERSION_DEP=">=dev-python/agate-1.5.0" +TEST_AGAINST_RDEPEND="xml? ( ${AGATE_VERSION_DEP}[xml,${PYTHON_USEDEP}] )" RDEPEND=" - >=dev-python/agate-1.5.0[${PYTHON_USEDEP}] + ${AGATE_VERSION_DEP}[${PYTHON_USEDEP}] >=dev-python/dbfread-2.0.5[${PYTHON_USEDEP}] + + ${TEST_AGAINST_RDEPEND} " +BDEPEND="test? ( ${AGATE_VERSION_DEP}[xml,${PYTHON_USEDEP}] )" + +distutils_enable_tests pytest + +AGATE_DBF_TEST_FILES=( + examples/test.dbf + examples/testdbf_converted.csv + tests/test_table.py +) +SRC_URI+=" test? ( " +for extra_file in "${AGATE_DBF_TEST_FILES[@]}"; do + SRC_URI+=" https://raw.githubusercontent.com/wireservice/agate-dbf/${PV}/${extra_file} -> ${P}_${extra_file//\//%2F}" +done +SRC_URI+=" )" + +agate-dbf_src_prepare() { + local extra_file + if use test; then + for extra_file in "${AGATE_DBF_TEST_FILES[@]}"; do + mkdir -p "${extra_file%/*}" || die + cp "${DISTDIR}/${P}_${extra_file//\//%2F}" "${extra_file}" || die + [[${extra_file} == *.py ]] && { true >> "${extra_file%/*}/__init__.py" || die; } + done + fi +} + +src_prepare() { + agate-dbf_src_prepare + distutils-r1_src_prepare +}