summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-04-20 11:01:09 +0200
committerMichał Górny <mgorny@gentoo.org>2017-04-20 11:18:13 +0200
commitba8562cf64248970666a2ea217cc1f481eb8a48f (patch)
tree0bd8cad75ccf4816a01cd8b1795aa6d479897f94 /dev-python/URLObject
parentdev-python/URLObject: Add missing PYTHON_USEDEP (diff)
downloadgentoo-ba8562cf64248970666a2ea217cc1f481eb8a48f.tar.gz
gentoo-ba8562cf64248970666a2ea217cc1f481eb8a48f.tar.bz2
gentoo-ba8562cf64248970666a2ea217cc1f481eb8a48f.zip
dev-python/URLObject: include tests
Use github-generated tarball instead of pypi because the latter lacks test subdirectory. Run tests using nosetests.
Diffstat (limited to 'dev-python/URLObject')
-rw-r--r--dev-python/URLObject/Manifest2
-rw-r--r--dev-python/URLObject/URLObject-2.4.2-r1.ebuild (renamed from dev-python/URLObject/URLObject-2.4.2.ebuild)16
2 files changed, 14 insertions, 4 deletions
diff --git a/dev-python/URLObject/Manifest b/dev-python/URLObject/Manifest
index f7e28b4b05af..4f5cc72fcd7d 100644
--- a/dev-python/URLObject/Manifest
+++ b/dev-python/URLObject/Manifest
@@ -1,2 +1,2 @@
DIST URLObject-2.4.0.tar.gz 12533 SHA256 f51272b12846db98af530b0a64f6593d2b1e8405f0aa580285b37ce8009b8d9c SHA512 1334c8d8dbb93f50fb6672ae5c2e1dbb8c880af65c18c96c7bc65bb46ae894ab0696d36236036c1e4434a6e75b692ecd0b37055ef9b55fb50ffbaf13197b1701 WHIRLPOOL 41de6cca4dccb45221d01d772ab7d5799a8ed8d797e2adc440e2b09f503f7ce324f647748318e85768f9528d75363a322e7030fd0056772443e1c18f0c52767e
-DIST URLObject-2.4.2.tar.gz 14050 SHA256 dd0f08a81d89485b1e587fd60aec4b8482859788e5ace67dd1b0d4a001515c57 SHA512 ebe92f2c2b32dcaee2121f07c2fdb6177df721bc3b14f3b85ce0b52a0222364a8436a964e93326e8ae178dafb17431879f36d3322a7f9c9ae12bfc23b748bdae WHIRLPOOL 3edbd17ba52e1603311ad3c78bf84c1d4316783e1776281fcfb7b3e302f3f8e00d193e412fb298df7d4d28c5498a1295d3ab55ea6778469cc3418c0676dbdf76
+DIST urlobject-2.4.2.tar.gz 25457 SHA256 6ea091b1a9e2500c2bdaf1201c8169529a7170a26f6fe6932648751ecd4209ac SHA512 970c5900171fa64624cd2ed2ba7f3a761057eda5c1fc07f881e8b7c74bde0cbbb7fc6c7c8694d8b8be0e991322da148528d99ff6fb2d4b75e1ddd1c2f474b4f3 WHIRLPOOL c8c6d3856169d796a87847d5e21c6f9a97ae82b248c0cf809aacca38bb49715837bbf67885ff216da205291b069ff98802aadb5358592fb74c8f14ee441efe72
diff --git a/dev-python/URLObject/URLObject-2.4.2.ebuild b/dev-python/URLObject/URLObject-2.4.2-r1.ebuild
index d42f11db1d13..1e98b597b70e 100644
--- a/dev-python/URLObject/URLObject-2.4.2.ebuild
+++ b/dev-python/URLObject/URLObject-2.4.2-r1.ebuild
@@ -1,23 +1,33 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
+EAPI=6
PYTHON_COMPAT=( python{2_7,3_4} )
inherit distutils-r1
+GITHUB_P=${P,,}
DESCRIPTION="A utility class for manipulating URLs"
HOMEPAGE="https://pypi.python.org/pypi/URLObject"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+# note: pypi tarball lacks tests
+# https://github.com/zacharyvoase/urlobject/issues/39
+SRC_URI="https://github.com/zacharyvoase/urlobject/archive/v${PV}.tar.gz -> ${GITHUB_P}.tar.gz"
LICENSE="BSD"
KEYWORDS="~amd64 ~x86"
SLOT="0"
-IUSE=""
+IUSE="test"
RDEPEND=""
DEPEND="
${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )
"
+
+S=${WORKDIR}/${GITHUB_P}
+
+python_test() {
+ nosetests -v || die "Tests fail with ${EPYTHON}"
+}