commit:     284ab66d9bd127c04503be4a99f5f9b4eb122ed0
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 12 14:54:03 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 12 15:40:13 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=284ab66d

dev-python/idna-ssl: Enable tests

All three of them.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/idna-ssl/Manifest              |  2 +-
 dev-python/idna-ssl/idna-ssl-1.1.0.ebuild | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/dev-python/idna-ssl/Manifest b/dev-python/idna-ssl/Manifest
index 0a672cb6471..0746793e2b9 100644
--- a/dev-python/idna-ssl/Manifest
+++ b/dev-python/idna-ssl/Manifest
@@ -1 +1 @@
-DIST idna-ssl-1.1.0.tar.gz 3377 BLAKE2B 
4a3baee5c976bdde4092eb3a980e555a72fb74395d3bc673ccd6e986e003b696cabdeb41061ad9b5f8da62074c034e4a07298fa993d5fff185f723ff4cb5f432
 SHA512 
f9db74cecabbbfddfd1817bbd8434ef2aafeea433c3eefff3f94c7e994da40e3f315fcda527f3a0c3743028f26bbc934f1dd21f94134123c3271975d0527cd35
+DIST idna-ssl-1.1.0.gh.tar.gz 5267 BLAKE2B 
07912379da74e4711f291a54bd0878e08d8820005b055f9b978a684b8263a801a7fb9ccbbf395aa226e009b3ebfe4a7cca11861502a9b859446279b111911209
 SHA512 
01e58e9f32f7e02ef203edbd76e199916ea0b16d01a929ca2fb272d83988483c17e9c36e131f47bfba7f7b657bef9e2be222f81800716a5b87d5847c27cce34d

diff --git a/dev-python/idna-ssl/idna-ssl-1.1.0.ebuild 
b/dev-python/idna-ssl/idna-ssl-1.1.0.ebuild
index c4270a8e234..19407984662 100644
--- a/dev-python/idna-ssl/idna-ssl-1.1.0.ebuild
+++ b/dev-python/idna-ssl/idna-ssl-1.1.0.ebuild
@@ -9,12 +9,24 @@ inherit distutils-r1
 
 DESCRIPTION="Patch ssl.match_hostname for Unicode(idna) domains support"
 HOMEPAGE="https://github.com/aio-libs/idna-ssl 
https://pypi.org/project/idna_ssl/";
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="
+       https://github.com/aio-libs/idna-ssl/archive/v${PV}.tar.gz
+               -> ${P}.gh.tar.gz"
 
 SLOT="0"
 LICENSE="MIT"
 KEYWORDS="amd64 ~arm ~arm64 x86"
 IUSE=""
 
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 RDEPEND="dev-python/idna[${PYTHON_USEDEP}]"
+BDEPEND="
+       test? ( dev-python/aiohttp[${PYTHON_USEDEP}] )"
+
+src_prepare() {
+       sed -e 's:--no-cov-on-fail --cov=idna_ssl --cov-report=term 
--cov-report=html::' \
+               -i setup.cfg || die
+       sed -e 's:test_aiohttp:_&:' -i tests/test_base.py || die
+       distutils-r1_src_prepare
+}
+
+distutils_enable_tests pytest

Reply via email to