1 |
commit: 38212e927a9233e80677309952b7ec44de5123b0 |
2 |
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
3 |
AuthorDate: Sun Feb 26 21:31:16 2023 +0000 |
4 |
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
5 |
CommitDate: Sun Feb 26 22:41:37 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=38212e92 |
7 |
|
8 |
dev-python/psycopg2cffi: enable py3.11, fix tests |
9 |
|
10 |
Closes: https://bugs.gentoo.org/819018 |
11 |
Closes: https://bugs.gentoo.org/897522 |
12 |
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in> |
13 |
|
14 |
dev-python/psycopg2cffi/Manifest | 2 +- |
15 |
.../files/psycopg2cffi-2.9.0-include-tests.patch | 10 ++++ |
16 |
.../psycopg2cffi/psycopg2cffi-2.9.0-r1.ebuild | 59 ++++++++++++++++++++++ |
17 |
dev-python/psycopg2cffi/psycopg2cffi-2.9.0.ebuild | 28 ---------- |
18 |
4 files changed, 70 insertions(+), 29 deletions(-) |
19 |
|
20 |
diff --git a/dev-python/psycopg2cffi/Manifest b/dev-python/psycopg2cffi/Manifest |
21 |
index 26be24ea9..d267c2e40 100644 |
22 |
--- a/dev-python/psycopg2cffi/Manifest |
23 |
+++ b/dev-python/psycopg2cffi/Manifest |
24 |
@@ -1 +1 @@ |
25 |
-DIST psycopg2cffi-2.9.0.tar.gz 65512 BLAKE2B 2e106eea22feb08aa7154dfc4959a9e68d946b34e872711f19856521dca050d0380498d3c20e762b31e7181ecfc5371a1b02c4bb711bccccfe56a4af9f497ffc SHA512 afd3ce9fa76dcd2df29b7aa8c5d31a33058023dc020ac829b95b8f7950fa17f2733f86a8c45f3d6eefeafae1c7f3997cbae820da98952d71336f7a1c72e84353 |
26 |
+DIST psycopg2cffi-2.9.0.gh.tar.gz 117682 BLAKE2B 9fe983f8f72fe384b1946143331b17dbcd03d12579241c7444d0d1c8bb7d51ed9576eace780ae3dd58c2d621b21f045347e25692514fa2fbbee2aac21ef89adb SHA512 520c4aaad33916ff5e1a7089888e04134bd5ad6f3115415a3dd04fb48afdc8ad0c68bf9e71d9158640392d3a2cd0b280eea8fa7a3d2ed63944e234d52f8cce43 |
27 |
|
28 |
diff --git a/dev-python/psycopg2cffi/files/psycopg2cffi-2.9.0-include-tests.patch b/dev-python/psycopg2cffi/files/psycopg2cffi-2.9.0-include-tests.patch |
29 |
new file mode 100644 |
30 |
index 000000000..1237fa7d5 |
31 |
--- /dev/null |
32 |
+++ b/dev-python/psycopg2cffi/files/psycopg2cffi-2.9.0-include-tests.patch |
33 |
@@ -0,0 +1,10 @@ |
34 |
+--- a/setup.py |
35 |
++++ b/setup.py |
36 |
+@@ -57,7 +57,7 @@ setup_kwargs = dict( |
37 |
+ description=README[0].strip(), |
38 |
+ long_description=''.join(README), |
39 |
+ test_suite='psycopg2cffi.tests.suite', |
40 |
+- packages=['psycopg2cffi', 'psycopg2cffi._impl', 'psycopg2cffi.tests'], |
41 |
++ packages=['psycopg2cffi', 'psycopg2cffi._impl', 'psycopg2cffi.tests', 'psycopg2cffi.tests.psycopg2_tests'], |
42 |
+ install_requires=['six'], |
43 |
+ ) |
44 |
|
45 |
diff --git a/dev-python/psycopg2cffi/psycopg2cffi-2.9.0-r1.ebuild b/dev-python/psycopg2cffi/psycopg2cffi-2.9.0-r1.ebuild |
46 |
new file mode 100644 |
47 |
index 000000000..965fa9788 |
48 |
--- /dev/null |
49 |
+++ b/dev-python/psycopg2cffi/psycopg2cffi-2.9.0-r1.ebuild |
50 |
@@ -0,0 +1,59 @@ |
51 |
+# Copyright 2019-2023 Gentoo Authors |
52 |
+# Distributed under the terms of the GNU General Public License v2 |
53 |
+ |
54 |
+EAPI=8 |
55 |
+ |
56 |
+PYTHON_COMPAT=( python3_{9..11} pypy3 ) |
57 |
+DISTUTILS_USE_PEP517=setuptools |
58 |
+inherit databases distutils-r1 edo |
59 |
+ |
60 |
+DESCRIPTION="Implementation of the psycopg2 module using cffi. Compatible with Psycopg 2.5." |
61 |
+HOMEPAGE=" |
62 |
+ https://pypi.org/project/psycopg2cffi/ |
63 |
+ https://github.com/chtd/psycopg2cffi |
64 |
+" |
65 |
+SRC_URI="https://github.com/chtd/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz" |
66 |
+ |
67 |
+LICENSE="LGPL-3+" |
68 |
+SLOT="0" |
69 |
+KEYWORDS="~amd64" |
70 |
+ |
71 |
+DEPEND="dev-db/postgresql:=" |
72 |
+RDEPEND=" |
73 |
+ ${DEPEND} |
74 |
+ dev-python/six[${PYTHON_USEDEP}] |
75 |
+" |
76 |
+BDEPEND=" |
77 |
+ virtual/python-cffi[${PYTHON_USEDEP}] |
78 |
+ test? ( |
79 |
+ $(epostgres --get-depend) |
80 |
+ ) |
81 |
+" |
82 |
+ |
83 |
+PATCHES=( "${FILESDIR}"/${P}-include-tests.patch ) |
84 |
+ |
85 |
+EPYTEST_DESELECT=( |
86 |
+ # hang |
87 |
+ tests/psycopg2_tests/test_cancel.py::CancelTests::test_async_cancel |
88 |
+ # fail |
89 |
+ tests/psycopg2_tests/test_dates.py::FromTicksTestCase::test_date_value_error_sec_59_99 |
90 |
+ tests/psycopg2_tests/test_types_basic.py::TypesBasicTests::testEmptyArray |
91 |
+) |
92 |
+ |
93 |
+distutils_enable_tests pytest |
94 |
+ |
95 |
+python_test() { |
96 |
+ cd "${T}" || die |
97 |
+ epytest --pyargs ${PN} |
98 |
+} |
99 |
+ |
100 |
+src_test() { |
101 |
+ local -x PSYCOPG2_TESTDB_HOST="localhost" |
102 |
+ local -x PSYCOPG2_TESTDB_PORT="55432" |
103 |
+ local -x PSYCOPG2_TESTDB_USER="postgres" |
104 |
+ epostgres --start ${PSYCOPG2_TESTDB_PORT} |
105 |
+ edo createdb -h ${PSYCOPG2_TESTDB_HOST} -p ${PSYCOPG2_TESTDB_PORT} -U postgres psycopg2_test |
106 |
+ |
107 |
+ distutils-r1_src_test |
108 |
+ epostgres --stop |
109 |
+} |
110 |
|
111 |
diff --git a/dev-python/psycopg2cffi/psycopg2cffi-2.9.0.ebuild b/dev-python/psycopg2cffi/psycopg2cffi-2.9.0.ebuild |
112 |
deleted file mode 100644 |
113 |
index a77ccb921..000000000 |
114 |
--- a/dev-python/psycopg2cffi/psycopg2cffi-2.9.0.ebuild |
115 |
+++ /dev/null |
116 |
@@ -1,28 +0,0 @@ |
117 |
-# Copyright 2019-2021 Gentoo Authors |
118 |
-# Distributed under the terms of the GNU General Public License v2 |
119 |
- |
120 |
-EAPI=8 |
121 |
- |
122 |
-PYTHON_COMPAT=( pypy3 python3_{8..10} ) |
123 |
- |
124 |
-inherit distutils-r1 |
125 |
- |
126 |
-DESCRIPTION="Implementation of the psycopg2 module using cffi. Compatible with Psycopg 2.5." |
127 |
-HOMEPAGE=" |
128 |
- https://github.com/chtd/psycopg2cffi |
129 |
- https://pypi.org/project/psycopg2cffi/ |
130 |
-" |
131 |
-SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" |
132 |
- |
133 |
-LICENSE="LGPL-3+" |
134 |
-SLOT="0" |
135 |
-KEYWORDS="~amd64" |
136 |
- |
137 |
-RDEPEND=" |
138 |
- dev-db/postgresql:* |
139 |
- dev-python/six[${PYTHON_USEDEP}] |
140 |
- virtual/python-cffi[${PYTHON_USEDEP}] |
141 |
-" |
142 |
-DEPEND="${RDEPEND}" |
143 |
- |
144 |
-distutils_enable_tests pytest |