1 |
commit: d12d86ca4678c51ace1dc73a6d0ca149fcb1ad9c |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 4 08:41:51 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 4 08:42:03 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d12d86ca |
7 |
|
8 |
dev-python/pytest: Add live ebuild for testing |
9 |
|
10 |
Package-Manager: portage-2.2.23 |
11 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
12 |
|
13 |
dev-python/pytest/pytest-9999.ebuild | 74 ++++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 74 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pytest/pytest-9999.ebuild b/dev-python/pytest/pytest-9999.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000..c7bacd9 |
19 |
--- /dev/null |
20 |
+++ b/dev-python/pytest/pytest-9999.ebuild |
21 |
@@ -0,0 +1,74 @@ |
22 |
+# Copyright 1999-2015 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+# $Id$ |
25 |
+ |
26 |
+EAPI=5 |
27 |
+ |
28 |
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 ) |
29 |
+ |
30 |
+inherit distutils-r1 git-r3 |
31 |
+ |
32 |
+DESCRIPTION="simple powerful testing with Python" |
33 |
+HOMEPAGE="http://pytest.org/ https://pypi.python.org/pypi/pytest" |
34 |
+SRC_URI="" |
35 |
+EGIT_REPO_URI="https://github.com/pytest-dev/pytest.git" |
36 |
+ |
37 |
+LICENSE="MIT" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="" |
40 |
+IUSE="doc test" |
41 |
+ |
42 |
+# When bumping, please check setup.py for the proper py version |
43 |
+PY_VER="1.4.29" |
44 |
+RDEPEND=">=dev-python/py-${PY_VER}[${PYTHON_USEDEP}]" |
45 |
+ |
46 |
+# dev-python/pluggy |
47 |
+# https://github.com/hpk42/pluggy |
48 |
+# See https://github.com/pytest-dev/pytest/issues/944 |
49 |
+# for why not now |
50 |
+ |
51 |
+#pexpect dep based on https://bitbucket.org/hpk42/pytest/issue/386/tests-fail-with-pexpect-30 |
52 |
+DEPEND="${RDEPEND} |
53 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
54 |
+ test? ( dev-python/pexpect[${PYTHON_USEDEP}] ) |
55 |
+ doc? ( |
56 |
+ >=dev-python/sphinx-1.2.3[${PYTHON_USEDEP}] |
57 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
58 |
+ dev-python/regendoc[${PYTHON_USEDEP}] |
59 |
+ )" |
60 |
+ |
61 |
+python_prepare_all() { |
62 |
+ # Disable versioning of py.test script to avoid collision with |
63 |
+ # versioning performed by the eclass. |
64 |
+ sed -e "s/return points/return {'py.test': target}/" -i setup.py || die "sed failed" |
65 |
+ grep -qF "py>=${PY_VER}" setup.py || die "Incorrect dev-python/py dependency" |
66 |
+ |
67 |
+ # Prevent un-needed d'loading |
68 |
+ sed -e "s/'sphinx.ext.intersphinx', //" -i doc/en/conf.py || die |
69 |
+ |
70 |
+ distutils-r1_python_prepare_all |
71 |
+} |
72 |
+ |
73 |
+python_compile_all() { |
74 |
+ if use doc; then |
75 |
+ mkdir doc/en/.build || die |
76 |
+ emake -C doc/en html |
77 |
+ fi |
78 |
+} |
79 |
+ |
80 |
+python_test() { |
81 |
+ # test_nose.py not written to suit py3.2 in pypy3 |
82 |
+ if [[ "${EPYTHON}" == pypy3 ]]; then |
83 |
+ "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py -x -v \ |
84 |
+ --ignore=testing/BUILD_nose.py \ |
85 |
+ || die "tests failed with ${EPYTHON}" |
86 |
+ else |
87 |
+ "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py -x -v --runpytest=subprocess \ |
88 |
+ || die "tests failed with ${EPYTHON}" |
89 |
+ fi |
90 |
+} |
91 |
+ |
92 |
+python_install_all() { |
93 |
+ use doc && HTML_DOCS=( doc/en/_build/html/. ) |
94 |
+ distutils-r1_python_install_all |
95 |
+} |