1 |
commit: ee23e6cf80e54eb8f39ce298c6947ed257c9877b |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 11 10:51:53 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=ee23e6cf |
7 |
|
8 |
dev-python/subunit: 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/subunit/subunit-1.1.0-r1.ebuild | 90 ++++++++++++++++++++++++++++++ |
14 |
1 file changed, 90 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/subunit/subunit-1.1.0-r1.ebuild b/dev-python/subunit/subunit-1.1.0-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000..96db9ac |
19 |
--- /dev/null |
20 |
+++ b/dev-python/subunit/subunit-1.1.0-r1.ebuild |
21 |
@@ -0,0 +1,90 @@ |
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 eutils multilib-minimal |
31 |
+ |
32 |
+DESCRIPTION="A streaming protocol for test results" |
33 |
+HOMEPAGE="https://launchpad.net/subunit https://pypi.python.org/pypi/python-subunit" |
34 |
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="Apache-2.0 BSD" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd" |
39 |
+IUSE="static-libs test" |
40 |
+ |
41 |
+RDEPEND=" |
42 |
+ >=dev-python/testtools-0.9.34[${PYTHON_USEDEP}] |
43 |
+ dev-python/extras[${PYTHON_USEDEP}]" |
44 |
+DEPEND="${RDEPEND} |
45 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
46 |
+ dev-lang/perl:= |
47 |
+ >=dev-libs/check-0.9.11[${MULTILIB_USEDEP}] |
48 |
+ >=dev-util/cppunit-1.13.2[${MULTILIB_USEDEP}] |
49 |
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] |
50 |
+ test? ( dev-python/testscenarios[${PYTHON_USEDEP}] )" |
51 |
+ |
52 |
+# Take out rogue & trivial failing tests that exit the suite before it even gets started |
53 |
+# The removed class in fact works fine in py3 and fails with py2.7 & pupu |
54 |
+# The setu to restrict this patch is just those 2 is not worth it. |
55 |
+PATCHES=( "${FILESDIR}"/1.0.0-tests.patch ) |
56 |
+ |
57 |
+src_prepare() { |
58 |
+ sed -i -e 's/os.chdir(os.path.dirname(__file__))//' setup.py || die |
59 |
+ |
60 |
+ # Install perl modules in vendor_perl, bug 534654. |
61 |
+ export INSTALLDIRS=vendor |
62 |
+ |
63 |
+ # needed for perl modules |
64 |
+ distutils-r1_src_prepare |
65 |
+ multilib_copy_sources |
66 |
+} |
67 |
+ |
68 |
+multilib_src_configure() { |
69 |
+ ECONF_SOURCE=${S} \ |
70 |
+ econf \ |
71 |
+ --enable-shared \ |
72 |
+ $(use_enable static-libs static) |
73 |
+} |
74 |
+ |
75 |
+multilib_src_compile() { |
76 |
+ default |
77 |
+ multilib_is_native_abi && distutils-r1_src_compile |
78 |
+} |
79 |
+ |
80 |
+python_test() { |
81 |
+ local -x PATH="${PWD}/shell/share:${PATH}" |
82 |
+ local -x PYTHONPATH=python |
83 |
+ # Following tests are known to fail in py2.7 & pypy. They pass under py3. |
84 |
+ # DO NOT re-file |
85 |
+ # test_add_error test_add_error_details test_add_expected_failure |
86 |
+ # test_add_expected_failure_details test_add_failure test_add_failure |
87 |
+ # https://bugs.launchpad.net/subunit/+bug/1436686 |
88 |
+ |
89 |
+ "${PYTHON}" -m testtools.run all_tests.test_suite || die "Testing failed with ${EPYTHON}" |
90 |
+} |
91 |
+ |
92 |
+multilib_src_test() { |
93 |
+ multilib_is_native_abi && distutils-r1_src_test |
94 |
+} |
95 |
+ |
96 |
+multilib_src_install() { |
97 |
+ local targets=( |
98 |
+ install-include_subunitHEADERS |
99 |
+ install-pcdataDATA |
100 |
+ install-exec-local |
101 |
+ install-libLTLIBRARIES |
102 |
+ ) |
103 |
+ emake DESTDIR="${D}" "${targets[@]}" |
104 |
+ |
105 |
+ multilib_is_native_abi && distutils-r1_src_install |
106 |
+} |
107 |
+ |
108 |
+multilib_src_install_all() { |
109 |
+ einstalldocs |
110 |
+ prune_libtool_files |
111 |
+} |