1 |
commit: 0da652db040029f8d46cf2355dc4a6924164f432 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 16 08:26:06 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 16 09:26:44 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0da652db |
7 |
|
8 |
dev-python/pytest: Bump to 3.6.3 |
9 |
|
10 |
dev-python/pytest/Manifest | 1 + |
11 |
.../pytest-3.6.3-pypy-syntaxerror-offset.patch | 29 ++++++++ |
12 |
dev-python/pytest/pytest-3.6.3.ebuild | 85 ++++++++++++++++++++++ |
13 |
3 files changed, 115 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/pytest/Manifest b/dev-python/pytest/Manifest |
16 |
index f7b0898a6e2..0f9eee021dc 100644 |
17 |
--- a/dev-python/pytest/Manifest |
18 |
+++ b/dev-python/pytest/Manifest |
19 |
@@ -2,3 +2,4 @@ DIST pytest-3.0.3.tar.gz 731934 BLAKE2B 7fb57d75bd54eb8a31d9701fdf739119715c475e |
20 |
DIST pytest-3.2.2.tar.gz 786396 BLAKE2B e669da930890e902b0323ec3a6685080ddd889e74655f7b4cb08ec421651f987597021a31471aab5a32d637b99620ce7792cbdf8f85561db3bb10ff06a446ba1 SHA512 6df3a50e7d1efeaf7a283920b16d1daf800798f422bc851b0aacd2bbd5cb0a88c95f9057fae49943b9dfe6527ed552cdf8d983b944ab91d0af252ee4f6eb82db |
21 |
DIST pytest-3.4.1.tar.gz 812928 BLAKE2B 27b25fcc5a268b1c92188c01bf16bf1eb4b8ced7d1a3c8095350ec55b1f1845a5d54bd6bd169142ca0d327f2f8d193774643174a356dd95fa07b3195bc1e8713 SHA512 75f728840cde6512619a03ce75fd0b04cb9d57a99f381366a0f9c10ffa3210448e7e85505357bfa9bfb0cca11cdedda2c0e091e5473ed82707a2597f234e659a |
22 |
DIST pytest-3.4.2.tar.gz 812719 BLAKE2B 96623d6cdea4bd79778175c18c949938505f1862010f700f9a8cb85f445910381af391a5b69e664fbbfc254bf46502c798c72026772070236a0a3bca7aeeb3d6 SHA512 787065ab76d4482799bb2da9f024c9c383e68cc1cc01f3b80f6ed9444ca6383d20953615696ed4dd01668777b094cf5002b23c4ce51828879dcf8ebf2170c71b |
23 |
+DIST pytest-3.6.3.tar.gz 830949 BLAKE2B 4c0df5d157b8bb0ac6261a793aac2a8074c869b1a7cbda3eda600c79648b3722eaf2a57514c1fece60e0aac324b8ed09e8e889dda268619204e9e1f1637e1c9b SHA512 e18d8e972cb1b05b037b9441eea5981ce036d8e2c2bab80f6e50f283df9bd08740296133990424cf78449f6d3d2fbd1d59709770aa972af99fe061583f2d79a7 |
24 |
|
25 |
diff --git a/dev-python/pytest/files/pytest-3.6.3-pypy-syntaxerror-offset.patch b/dev-python/pytest/files/pytest-3.6.3-pypy-syntaxerror-offset.patch |
26 |
new file mode 100644 |
27 |
index 00000000000..31dd0054676 |
28 |
--- /dev/null |
29 |
+++ b/dev-python/pytest/files/pytest-3.6.3-pypy-syntaxerror-offset.patch |
30 |
@@ -0,0 +1,29 @@ |
31 |
+https://salsa.debian.org/python-team/modules/pytest/commit/405c05a0827592515de76e23c94de1f7773273e6.patch |
32 |
+ |
33 |
+(updated by mgorny for 3.6.3 -- upstream quoting changes) |
34 |
+ |
35 |
+From 405c05a0827592515de76e23c94de1f7773273e6 Mon Sep 17 00:00:00 2001 |
36 |
+From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=BD?= <onovy@××××××.org> |
37 |
+Date: Thu, 10 May 2018 11:42:56 +0200 |
38 |
+Subject: [PATCH] Fix PyPy SyntaxError offset in tests |
39 |
+ |
40 |
+--- |
41 |
+ testing/code/test_source.py | 2 +- |
42 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
43 |
+ |
44 |
+diff --git a/testing/code/test_source.py b/testing/code/test_source.py |
45 |
+index fcce3fa..22278d8 100644 |
46 |
+--- a/testing/code/test_source.py |
47 |
++++ b/testing/code/test_source.py |
48 |
+@@ -117,7 +117,7 @@ def test_source_strip_multiline(): |
49 |
+ def test_syntaxerror_rerepresentation(): |
50 |
+ ex = pytest.raises(SyntaxError, _pytest._code.compile, "xyz xyz") |
51 |
+ assert ex.value.lineno == 1 |
52 |
+- assert ex.value.offset in (4, 7) # XXX pypy/jython versus cpython? |
53 |
++ assert ex.value.offset in (4, 5, 7) # XXX pypy/jython versus cpython? |
54 |
+ assert ex.value.text.strip(), "x x" |
55 |
+ |
56 |
+ |
57 |
+-- |
58 |
+2.18.0 |
59 |
+ |
60 |
|
61 |
diff --git a/dev-python/pytest/pytest-3.6.3.ebuild b/dev-python/pytest/pytest-3.6.3.ebuild |
62 |
new file mode 100644 |
63 |
index 00000000000..fcf42f682c5 |
64 |
--- /dev/null |
65 |
+++ b/dev-python/pytest/pytest-3.6.3.ebuild |
66 |
@@ -0,0 +1,85 @@ |
67 |
+# Copyright 1999-2018 Gentoo Foundation |
68 |
+# Distributed under the terms of the GNU General Public License v2 |
69 |
+ |
70 |
+EAPI=6 |
71 |
+ |
72 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} ) |
73 |
+ |
74 |
+inherit distutils-r1 |
75 |
+ |
76 |
+DESCRIPTION="Simple powerful testing with Python" |
77 |
+HOMEPAGE="http://pytest.org/" |
78 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
79 |
+ |
80 |
+LICENSE="MIT" |
81 |
+SLOT="0" |
82 |
+KEYWORDS="~amd64 ~arm ~x86" |
83 |
+# doc apparently requires sphinxcontrib_trio, not yet packaged |
84 |
+IUSE="test" # doc |
85 |
+ |
86 |
+# When bumping, please check setup.py for the proper py version |
87 |
+PY_VER="1.5.0" |
88 |
+COMMON_DEPEND=" |
89 |
+ >=dev-python/atomicwrites-1.0[${PYTHON_USEDEP}] |
90 |
+ >=dev-python/attrs-17.2.0[${PYTHON_USEDEP}] |
91 |
+ >=dev-python/more-itertools-4.0.0[${PYTHON_USEDEP}] |
92 |
+ >=dev-python/pluggy-0.5[${PYTHON_USEDEP}] |
93 |
+ >=dev-python/py-${PY_VER}[${PYTHON_USEDEP}] |
94 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
95 |
+ >=dev-python/six-1.10.0[${PYTHON_USEDEP}] |
96 |
+ virtual/python-funcsigs[${PYTHON_USEDEP}]" |
97 |
+ |
98 |
+# doc? ( |
99 |
+# dev-python/pyyaml[${PYTHON_USEDEP}] |
100 |
+# dev-python/sphinx[${PYTHON_USEDEP}] |
101 |
+# )" |
102 |
+ |
103 |
+# flake & pytest-capturelog cause a number of tests to fail |
104 |
+DEPEND="${COMMON_DEPEND} |
105 |
+ dev-python/setuptools_scm[${PYTHON_USEDEP}] |
106 |
+ test? ( |
107 |
+ >=dev-python/hypothesis-3.5.2[${PYTHON_USEDEP}] |
108 |
+ >=dev-python/pytest-xdist-1.22.2[${PYTHON_USEDEP}] |
109 |
+ dev-python/nose[${PYTHON_USEDEP}] |
110 |
+ dev-python/mock[${PYTHON_USEDEP}] |
111 |
+ dev-python/requests[${PYTHON_USEDEP}] |
112 |
+ !!dev-python/flaky |
113 |
+ !!dev-python/pytest-capturelog |
114 |
+ )" |
115 |
+ |
116 |
+RDEPEND=" |
117 |
+ ${COMMON_DEPEND} |
118 |
+ !<dev-python/logilab-common-1.3.0" |
119 |
+ |
120 |
+python_prepare_all() { |
121 |
+ local PATCHES=( |
122 |
+ "${FILESDIR}"/pytest-3.6.3-pypy-syntaxerror-offset.patch |
123 |
+ ) |
124 |
+ |
125 |
+ grep -qF "py>=${PY_VER}" setup.py || die "Incorrect dev-python/py dependency" |
126 |
+ |
127 |
+ # Something in the ebuild environment causes this to hang/error. |
128 |
+ # https://bugs.gentoo.org/598442 |
129 |
+ rm testing/test_pdb.py || die |
130 |
+ |
131 |
+ # those tests appear to hang with python3.5+; TODO: investigate why |
132 |
+ sed -i -e 's:test_runtest_location_shown_before_test_starts:_&:' \ |
133 |
+ testing/test_terminal.py || die |
134 |
+ sed -i -e 's:test_trial_pdb:_&:' testing/test_unittest.py || die |
135 |
+ |
136 |
+ distutils-r1_python_prepare_all |
137 |
+} |
138 |
+ |
139 |
+python_test() { |
140 |
+ "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py --lsof -rfsxX \ |
141 |
+ -vv testing || die "tests failed with ${EPYTHON}" |
142 |
+} |
143 |
+ |
144 |
+#python_compile_all() { |
145 |
+# use doc && emake -C doc/en html |
146 |
+#} |
147 |
+# |
148 |
+#python_install_all() { |
149 |
+# use doc && HTML_DOCS=( doc/en/_build/html/. ) |
150 |
+# distutils-r1_python_install_all |
151 |
+#} |