summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-07-16 16:03:32 +0200
committerMichał Górny <mgorny@gentoo.org>2018-07-16 16:05:52 +0200
commit0fae70a0880d2a182fe3544cd904e56e702a7484 (patch)
treeb8c3c092a7727bfe7ea76234b4e55344e1a45cbf /dev-python
parentmedia-sound/soundconverter: amd64 stable wrt bug #661288 (diff)
downloadgentoo-0fae70a0880d2a182fe3544cd904e56e702a7484.tar.gz
gentoo-0fae70a0880d2a182fe3544cd904e56e702a7484.tar.bz2
gentoo-0fae70a0880d2a182fe3544cd904e56e702a7484.zip
dev-python/pyhamcrest: Enable tests
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/pyhamcrest/Manifest1
-rw-r--r--dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild54
2 files changed, 55 insertions, 0 deletions
diff --git a/dev-python/pyhamcrest/Manifest b/dev-python/pyhamcrest/Manifest
index d52753b709c9..2b62afa078ce 100644
--- a/dev-python/pyhamcrest/Manifest
+++ b/dev-python/pyhamcrest/Manifest
@@ -1 +1,2 @@
+DIST PyHamcrest-1.9.0.gh.tar.gz 57650 BLAKE2B c497688f03ec3b072d8ab076fc096a442d5cbbd94493eae57779879ccb6f281477aeeb7f7a67e539442010e60194f9f04a6deddd1d2267e9743742b45433f124 SHA512 3a878637ed5138365416c170871a63640f089047b723c7ec8db893dd716c0b1cdad16a98584700405693b954af7d4868a8543d1a3fc58ded22b493c8c61661b4
DIST PyHamcrest-1.9.0.tar.gz 376623 BLAKE2B 808c74aa4dff89467c126cbc0e18029a9504cb27bbf03662a90666f85c76d7d7617260f50d35acde3a8e9e437b846589423cbb3697f8ceb86d0b5b838c586ebd SHA512 3b8393d0079b619b208ec7f06ed5133c4ff9d9dba050f818adf56347fc2225fd1c85d60f3dc262b7b9722061f0b8e4966180b6b96245a371e578d0d51633b4b0
diff --git a/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild b/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild
new file mode 100644
index 000000000000..4149b8e2ad3f
--- /dev/null
+++ b/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1
+
+MY_PN="PyHamcrest"
+
+DESCRIPTION="Hamcrest framework for matcher objects"
+HOMEPAGE="https://github.com/hamcrest/PyHamcrest"
+SRC_URI="https://github.com/hamcrest/PyHamcrest/archive/V${PV}.tar.gz -> ${MY_PN}-${PV}.gh.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc examples test"
+
+RDEPEND=">=dev-python/six-1.4[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? (
+ >=dev-python/sphinx-1.2.2[${PYTHON_USEDEP}]
+ dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+ )
+ test? (
+ >=dev-python/pytest-2.6[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ )"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+python_prepare_all() {
+ # enables coverage testing which we don't want
+ rm pytest.ini || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && esetup.py build_sphinx
+}
+
+python_test() {
+ py.test -vv || die "Tests failed under ${EPYTHON}"
+ "${PYTHON}" tests/object_import.py || die "Tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+ use examples && dodoc -r examples
+
+ distutils-r1_python_install_all
+}