Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest/
Date: Sun, 11 Oct 2015 11:25:36
Message-Id: 1444562669.702f61d0a4c8a53be782f92989445124fdb3bcbf.jlec@gentoo
1 commit: 702f61d0a4c8a53be782f92989445124fdb3bcbf
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 11 10:46:36 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 11 11:24:29 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=702f61d0
7
8 dev-python/pytest: Add python3.5 support
9
10 Package-Manager: portage-2.2.23
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 dev-python/pytest/pytest-2.7.3-r1.ebuild | 63 +++++++++++++++++++++++++++
14 dev-python/pytest/pytest-2.8.2-r1.ebuild | 73 ++++++++++++++++++++++++++++++++
15 2 files changed, 136 insertions(+)
16
17 diff --git a/dev-python/pytest/pytest-2.7.3-r1.ebuild b/dev-python/pytest/pytest-2.7.3-r1.ebuild
18 new file mode 100644
19 index 0000000..e444994
20 --- /dev/null
21 +++ b/dev-python/pytest/pytest-2.7.3-r1.ebuild
22 @@ -0,0 +1,63 @@
23 +# Copyright 1999-2015 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Id$
26 +
27 +EAPI=5
28 +
29 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
30 +
31 +inherit distutils-r1
32 +
33 +DESCRIPTION="Simple powerful testing with Python"
34 +HOMEPAGE="http://pytest.org/ https://pypi.python.org/pypi/pytest"
35 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
36 +
37 +LICENSE="MIT"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
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 +#pexpect dep based on https://bitbucket.org/hpk42/pytest/issue/386/tests-fail-with-pexpect-30
47 +DEPEND="${RDEPEND}
48 + dev-python/setuptools[${PYTHON_USEDEP}]
49 + test? ( dev-python/pexpect[${PYTHON_USEDEP}] )
50 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
51 +
52 +python_prepare_all() {
53 + # Disable versioning of py.test script to avoid collision with
54 + # versioning performed by the eclass.
55 + sed -e "s/return points/return {'py.test': target}/" -i setup.py || die "sed failed"
56 + grep -qF "py>=${PY_VER}" setup.py || die "Incorrect dev-python/py dependency"
57 +
58 + # Prevent un-needed d'loading
59 + sed -e "s/'sphinx.ext.intersphinx', //" -i doc/en/conf.py || die
60 + distutils-r1_python_prepare_all
61 +}
62 +
63 +python_compile_all() {
64 + if use doc; then
65 + mkdir doc/en/.build || die
66 + emake -C doc/en html
67 + fi
68 +}
69 +
70 +python_test() {
71 + # test_nose.py not written to suit py3.2 in pypy3
72 + if [[ "${EPYTHON}" == pypy3 ]]; then
73 + "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py \
74 + --ignore=testing/test_nose.py \
75 + || die "tests failed with ${EPYTHON}"
76 + else
77 + "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py \
78 + || die "tests failed with ${EPYTHON}"
79 + fi
80 +}
81 +
82 +python_install_all() {
83 + use doc && dohtml -r doc/en/_build/html/
84 + distutils-r1_python_install_all
85 +}
86
87 diff --git a/dev-python/pytest/pytest-2.8.2-r1.ebuild b/dev-python/pytest/pytest-2.8.2-r1.ebuild
88 new file mode 100644
89 index 0000000..0b5e189
90 --- /dev/null
91 +++ b/dev-python/pytest/pytest-2.8.2-r1.ebuild
92 @@ -0,0 +1,73 @@
93 +# Copyright 1999-2015 Gentoo Foundation
94 +# Distributed under the terms of the GNU General Public License v2
95 +# $Id$
96 +
97 +EAPI=5
98 +
99 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
100 +
101 +inherit distutils-r1
102 +
103 +DESCRIPTION="simple powerful testing with Python"
104 +HOMEPAGE="http://pytest.org/ https://pypi.python.org/pypi/pytest"
105 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
106 +
107 +LICENSE="MIT"
108 +SLOT="0"
109 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
110 +IUSE="doc test"
111 +
112 +# When bumping, please check setup.py for the proper py version
113 +PY_VER="1.4.29"
114 +RDEPEND=">=dev-python/py-${PY_VER}[${PYTHON_USEDEP}]"
115 +
116 +# dev-python/pluggy
117 +# https://github.com/hpk42/pluggy
118 +# See https://github.com/pytest-dev/pytest/issues/944
119 +# for why not now
120 +
121 +#pexpect dep based on https://bitbucket.org/hpk42/pytest/issue/386/tests-fail-with-pexpect-30
122 +DEPEND="${RDEPEND}
123 + dev-python/setuptools[${PYTHON_USEDEP}]
124 + test? ( dev-python/pexpect[${PYTHON_USEDEP}] )
125 + doc? (
126 + >=dev-python/sphinx-1.2.3[${PYTHON_USEDEP}]
127 + dev-python/pyyaml[${PYTHON_USEDEP}]
128 + dev-python/regendoc[${PYTHON_USEDEP}]
129 + )"
130 +
131 +python_prepare_all() {
132 + chmod o-w *egg*/* || die
133 + # Disable versioning of py.test script to avoid collision with
134 + # versioning performed by the eclass.
135 + sed -e "s/return points/return {'py.test': target}/" -i setup.py || die "sed failed"
136 + grep -qF "py>=${PY_VER}" setup.py || die "Incorrect dev-python/py dependency"
137 +
138 + # Prevent un-needed d'loading
139 + sed -e "s/'sphinx.ext.intersphinx', //" -i doc/en/conf.py || die
140 + distutils-r1_python_prepare_all
141 +}
142 +
143 +python_compile_all() {
144 + if use doc; then
145 + mkdir doc/en/.build || die
146 + emake -C doc/en html
147 + fi
148 +}
149 +
150 +python_test() {
151 + # test_nose.py not written to suit py3.2 in pypy3
152 + if [[ "${EPYTHON}" == pypy3 ]]; then
153 + "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py -x -v \
154 + --ignore=testing/BUILD_nose.py \
155 + || die "tests failed with ${EPYTHON}"
156 + else
157 + "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py -x -v --runpytest=subprocess \
158 + || die "tests failed with ${EPYTHON}"
159 + fi
160 +}
161 +
162 +python_install_all() {
163 + use doc && HTML_DOCS=( doc/en/_build/html/. )
164 + distutils-r1_python_install_all
165 +}