1 |
commit: 6f4144fd5147726b242b24daddab66fd72c9146d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 20 21:29:39 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 20 22:59:56 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f4144fd |
7 |
|
8 |
dev-python/patsy: Enable py3.10 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/patsy/files/patsy-0.5.1-py310.patch | 39 ++++++++++++++++++++++++++ |
13 |
dev-python/patsy/patsy-0.5.1.ebuild | 6 +++- |
14 |
2 files changed, 44 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/dev-python/patsy/files/patsy-0.5.1-py310.patch b/dev-python/patsy/files/patsy-0.5.1-py310.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..04a712e7e42 |
19 |
--- /dev/null |
20 |
+++ b/dev-python/patsy/files/patsy-0.5.1-py310.patch |
21 |
@@ -0,0 +1,39 @@ |
22 |
+From 6328c7652e4d7fda9872a555d31658e54b7b0e6e Mon Sep 17 00:00:00 2001 |
23 |
+From: thequackdaddy <pquack@×××××.com> |
24 |
+Date: Sun, 28 Oct 2018 19:38:08 -0500 |
25 |
+Subject: [PATCH] MAINT: A few python 3.7 fixes |
26 |
+ |
27 |
+--- |
28 |
+ patsy/constraint.py | 5 ++++- |
29 |
+ tools/check-API-refs.py | 2 +- |
30 |
+ 3 files changed, 6 insertions(+), 2 deletions(-) |
31 |
+ |
32 |
+diff --git a/patsy/constraint.py b/patsy/constraint.py |
33 |
+index ca9f6e2..d710a94 100644 |
34 |
+--- a/patsy/constraint.py |
35 |
++++ b/patsy/constraint.py |
36 |
+@@ -10,7 +10,10 @@ |
37 |
+ __all__ = ["LinearConstraint"] |
38 |
+ |
39 |
+ import re |
40 |
+-from collections import Mapping |
41 |
++try: |
42 |
++ from collections.abc import Mapping |
43 |
++except ImportError: |
44 |
++ from collections import Mapping |
45 |
+ import six |
46 |
+ import numpy as np |
47 |
+ from patsy import PatsyError |
48 |
+diff --git a/tools/check-API-refs.py b/tools/check-API-refs.py |
49 |
+index 8e9e8a1..9349028 100644 |
50 |
+--- a/tools/check-API-refs.py |
51 |
++++ b/tools/check-API-refs.py |
52 |
+@@ -9,7 +9,7 @@ |
53 |
+ root = dirname(dirname(abspath(__file__))) |
54 |
+ patsy_ref = root + "/doc/API-reference.rst" |
55 |
+ |
56 |
+-doc_re = re.compile("^\.\. (.*):: ([^\(]*)") |
57 |
++doc_re = re.compile("^\\.\\. (.*):: ([^\\(]*)") |
58 |
+ def _documented(rst_path): |
59 |
+ documented = set() |
60 |
+ for line in open(rst_path): |
61 |
|
62 |
diff --git a/dev-python/patsy/patsy-0.5.1.ebuild b/dev-python/patsy/patsy-0.5.1.ebuild |
63 |
index 39d9848be72..78b6a5d4cd6 100644 |
64 |
--- a/dev-python/patsy/patsy-0.5.1.ebuild |
65 |
+++ b/dev-python/patsy/patsy-0.5.1.ebuild |
66 |
@@ -2,7 +2,7 @@ |
67 |
# Distributed under the terms of the GNU General Public License v2 |
68 |
|
69 |
EAPI=7 |
70 |
-PYTHON_COMPAT=( python3_{8..9} ) |
71 |
+PYTHON_COMPAT=( python3_{8..10} ) |
72 |
|
73 |
inherit distutils-r1 |
74 |
|
75 |
@@ -21,3 +21,7 @@ RDEPEND=" |
76 |
" |
77 |
|
78 |
distutils_enable_tests nose |
79 |
+ |
80 |
+PATCHES=( |
81 |
+ "${FILESDIR}"/${P}-py310.patch |
82 |
+) |