1 |
commit: 02ef06e5805499f75664bf97044aa035ba5ef770 |
2 |
Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 1 02:59:57 2019 +0000 |
4 |
Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 1 03:06:25 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02ef06e5 |
7 |
|
8 |
dev-python/astroid: fix tests on py37 |
9 |
|
10 |
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
dev-python/astroid/astroid-2.1.0.ebuild | 6 +++++- |
14 |
dev-python/astroid/files/astroid-2.1.0-fix-tests.patch | 16 ++++++++++++++++ |
15 |
2 files changed, 21 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/dev-python/astroid/astroid-2.1.0.ebuild b/dev-python/astroid/astroid-2.1.0.ebuild |
18 |
index 34044e6fa01..b23580f1816 100644 |
19 |
--- a/dev-python/astroid/astroid-2.1.0.ebuild |
20 |
+++ b/dev-python/astroid/astroid-2.1.0.ebuild |
21 |
@@ -1,4 +1,4 @@ |
22 |
-# Copyright 1999-2019 Gentoo Foundation |
23 |
+# Copyright 1999-2019 Gentoo Authors |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
|
26 |
EAPI=7 |
27 |
@@ -32,6 +32,10 @@ DEPEND=" |
28 |
dev-python/python-dateutil[${PYTHON_USEDEP}] |
29 |
)" |
30 |
|
31 |
+PATCHES=( |
32 |
+ "${FILESDIR}/${PN}-2.1.0-fix-tests.patch" |
33 |
+) |
34 |
+ |
35 |
python_prepare_all() { |
36 |
# Disable failing tests |
37 |
|
38 |
|
39 |
diff --git a/dev-python/astroid/files/astroid-2.1.0-fix-tests.patch b/dev-python/astroid/files/astroid-2.1.0-fix-tests.patch |
40 |
new file mode 100644 |
41 |
index 00000000000..32e75225507 |
42 |
--- /dev/null |
43 |
+++ b/dev-python/astroid/files/astroid-2.1.0-fix-tests.patch |
44 |
@@ -0,0 +1,16 @@ |
45 |
+typed_ast doesn't support py37 yet and disables its support under py37. |
46 |
+However, when dev-python/types-ast is installed, the test suite mistakenly |
47 |
+thinks that it has to test typed_ast-related things and fails. |
48 |
+diff --git a/astroid/tests/unittest_nodes.py b/astroid/tests/unittest_nodes.py |
49 |
+index 56b195c2..762f1af2 100644 |
50 |
+--- a/astroid/tests/unittest_nodes.py |
51 |
++++ b/astroid/tests/unittest_nodes.py |
52 |
+@@ -49,6 +49,8 @@ try: |
53 |
+ except ImportError: |
54 |
+ HAS_TYPED_AST = False |
55 |
+ |
56 |
++if sys.version_info[:2] >= (3, 7): |
57 |
++ HAS_TYPED_AST = False |
58 |
+ |
59 |
+ class AsStringTest(resources.SysPathSetup, unittest.TestCase): |
60 |
+ def test_tuple_as_string(self): |