Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/gmpy/files/, dev-python/gmpy/
Date: Wed, 12 Jan 2022 11:42:57
Message-Id: 1641987770.aed9ab620944c1e558f0048d8a12a72fed7904df.mgorny@gentoo
1 commit: aed9ab620944c1e558f0048d8a12a72fed7904df
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 12 11:41:05 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 12 11:42:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aed9ab62
7
8 dev-python/gmpy: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/gmpy/Manifest | 1 -
13 .../gmpy/files/gmpy-2.1.0_beta5-failed-tests.patch | 132 ---------------------
14 .../gmpy/files/gmpy-2.1.0_beta5-pyhash-nan.patch | 17 ---
15 dev-python/gmpy/gmpy-2.1.0_beta5.ebuild | 45 -------
16 4 files changed, 195 deletions(-)
17
18 diff --git a/dev-python/gmpy/Manifest b/dev-python/gmpy/Manifest
19 index 011257bc41ed..19a0ff522567 100644
20 --- a/dev-python/gmpy/Manifest
21 +++ b/dev-python/gmpy/Manifest
22 @@ -1,4 +1,3 @@
23 DIST gmpy2-2.1.0.tar.gz 258571 BLAKE2B 942786c9a2e1220ecad15e97c26cbea0b93c7719e5081f6defe7b71d43be0c4ce259355eb34fa013a0b90679022535a271f26425c615e65103d3a2705b27ec8e SHA512 0d62354a1446708548b8dfdc6d7f8000151eb5901251f87f935144f615fd586726617c7a2bd05b91dc3e2a0cfc8797cd81d60afb8c705da153b537345eaddb34
24 -DIST gmpy2-2.1.0b5.tar.gz 264742 BLAKE2B 1dd6dc66f9ec8cb2738f449112aa44feb40ba983f6da5f7a0760016e79ffed19037d77d47c0c0b816f9088725207e50ba3bd423349ed4c744ff03059c4c6a19a SHA512 7dc647642d7b61af77258881a7b91ab967dd11a86ba88ff5b7fd41cd4c999d2bb4cfe586511e79cc5f21f0f00d0823bbd2620d69df051c8cead15090423a657a
25 DIST gmpy2-2.1.1.tar.gz 258607 BLAKE2B 3c070d101066fb0ba5da61b8c1eacf6bbd334aed987161091f31bccc1e836430cb844e0fdcb5017718341761f54c0fc3290e37ace28a5c4fc07930a194e77256 SHA512 37a08b546476f1b49cdfdb04b3a6d4da266615f789eb03896d5e2dd326c91f0fb9523504414b0de30e7265840e2ef77362a5ff011906952100c8b1da4d88d709
26 DIST gmpy2-2.1.2.tar.gz 258445 BLAKE2B 5fd89478bb7c48c317a7af74fd872e5a9c1141f8f23c110aba7298d1a325caa13e24f1a2e601d6b3c6f6af30d60505f9161a03def16df59dddabe611fb600ef4 SHA512 abfeb0d8a155235e3aa797ca7b34ab6947f0714273e9d381167a9f6273bad34689e1985c139080b146e072b5bfbb4fa2b937566a14f4b94cc09ed21b3f2082b7
27
28 diff --git a/dev-python/gmpy/files/gmpy-2.1.0_beta5-failed-tests.patch b/dev-python/gmpy/files/gmpy-2.1.0_beta5-failed-tests.patch
29 deleted file mode 100644
30 index 38a98579409a..000000000000
31 --- a/dev-python/gmpy/files/gmpy-2.1.0_beta5-failed-tests.patch
32 +++ /dev/null
33 @@ -1,132 +0,0 @@
34 -diff --git a/src/gmpy2_mpz.c b/src/gmpy2_mpz.c
35 -index e5087fa..66a297a 100644
36 ---- a/src/gmpy2_mpz.c
37 -+++ b/src/gmpy2_mpz.c
38 -@@ -69,7 +69,7 @@ static PyNumberMethods GMPy_MPZ_number_methods =
39 - (binaryfunc) GMPy_MPZ_ISub_Slot, /* nb_inplace_subtract */
40 - (binaryfunc) GMPy_MPZ_IMul_Slot, /* nb_inplace_multiply */
41 - (binaryfunc) GMPy_MPZ_IRem_Slot, /* nb_inplace_remainder */
42 -- (ternaryfunc) GMPy_MPZ_IPow_Slot, /* nb_inplace_power */
43 -+ 0, /* nb_inplace_power */
44 - (binaryfunc) GMPy_MPZ_ILshift_Slot, /* nb_inplace_lshift */
45 - (binaryfunc) GMPy_MPZ_IRshift_Slot, /* nb_inplace_rshift */
46 - 0, /* nb_inplace_and */
47 -@@ -113,7 +113,7 @@ static PyNumberMethods GMPy_MPZ_number_methods =
48 - (binaryfunc) GMPy_MPZ_IMul_Slot, /* nb_inplace_multiply */
49 - 0, /* nb_inplace_divide */
50 - (binaryfunc) GMPy_MPZ_IRem_Slot, /* nb_inplace_remainder */
51 -- (ternaryfunc) GMPy_MPZ_IPow_Slot, /* nb_inplace_power */
52 -+ 0, /* nb_inplace_power */
53 - (binaryfunc) GMPy_MPZ_ILshift_Slot, /* nb_inplace_lshift */
54 - (binaryfunc) GMPy_MPZ_IRshift_Slot, /* nb_inplace_rshift */
55 - 0, /* nb_inplace_and */
56 -@@ -229,4 +229,3 @@ static PyTypeObject MPZ_Type =
57 - GMPy_MPZ_NewInit, /* tp_new */
58 - 0, /* tp_free */
59 - };
60 --
61 -diff --git a/src/gmpy2_pow.c b/src/gmpy2_pow.c
62 -index ddcb43a..cf96470 100644
63 ---- a/src/gmpy2_pow.c
64 -+++ b/src/gmpy2_pow.c
65 -@@ -98,8 +98,11 @@ GMPy_Integer_Pow(PyObject *b, PyObject *e, PyObject *m, CTXT_Object *context)
66 - unsigned long el;
67 -
68 - if (mpz_sgn(tempe->z) < 0) {
69 -- VALUE_ERROR("pow() exponent cannot be negative");
70 -- goto err;
71 -+ Py_DECREF((PyObject*)result);
72 -+ Py_DECREF((PyObject*)tempb);
73 -+ Py_DECREF((PyObject*)tempe);
74 -+
75 -+ return GMPy_Real_Pow(b, e, m, context);
76 - }
77 -
78 - /* Catch -1, 0, 1 getting raised to large exponents. */
79 -diff --git a/src/gmpy2_xmpz_inplace.c b/src/gmpy2_xmpz_inplace.c
80 -index bbcd977..e5bbf09 100644
81 ---- a/src/gmpy2_xmpz_inplace.c
82 -+++ b/src/gmpy2_xmpz_inplace.c
83 -@@ -271,14 +271,14 @@ GMPy_XMPZ_IPow_Slot(PyObject *self, PyObject *other, PyObject *mod)
84 - mp_bitcnt_t exp;
85 -
86 - exp = mp_bitcnt_t_From_Integer(other);
87 -- if (exp == (mp_bitcnt_t)(-1) && PyErr_Occurred()) {
88 -- PyErr_Clear();
89 -- Py_RETURN_NOTIMPLEMENTED;
90 -- }
91 -+ if (exp == (mp_bitcnt_t)(-1) && PyErr_Occurred())
92 -+ return NULL;
93 -
94 - mpz_pow_ui(MPZ(self), MPZ(self), exp);
95 - Py_INCREF((PyObject*)self);
96 - return (PyObject*)self;
97 -+
98 -+ Py_RETURN_NOTIMPLEMENTED;
99 - }
100 -
101 - /* Inplace xmpz and.
102 -@@ -346,4 +346,3 @@ GMPy_XMPZ_IIor_Slot(PyObject *self, PyObject *other)
103 -
104 - Py_RETURN_NOTIMPLEMENTED;
105 - }
106 --
107 -diff --git a/test/test_gmpy2_mpz_inplace.txt b/test/test_gmpy2_mpz_inplace.txt
108 -index e7a8b96..147118c 100644
109 ---- a/test/test_gmpy2_mpz_inplace.txt
110 -+++ b/test/test_gmpy2_mpz_inplace.txt
111 -@@ -147,18 +147,16 @@ Test ipow operator
112 - mpz(25)
113 - >>> x **= xmpz(2); x
114 - mpz(625)
115 -->>> x **= -2
116 --Traceback (most recent call last):
117 -- File "<stdin>", line 1, in <module>
118 --TypeError: unsupported operand type(s) for ** or pow(): 'mpz' and 'int'
119 -+>>> x **= -2; x
120 -+mpfr('2.5600000000000001e-06')
121 -+>>> x = mpz(625)
122 - >>> x **= 2; x
123 - mpz(390625)
124 -->>> x **= mpfr(2)
125 --Traceback (most recent call last):
126 -- File "<stdin>", line 1, in <module>
127 --TypeError: unsupported operand type(s) for ** or pow(): 'mpz' and 'mpfr'
128 -->>> 1
129 --1
130 -+>>> x **= mpfr(2); x
131 -+mpfr('152587890625.0')
132 -+>>> x = mpz(390625)
133 -+>>> x **= mpfr(-2); x
134 -+mpfr('6.5535999999999999e-12')
135 -
136 - Test iand operator
137 - ------------------
138 -diff --git a/test/test_gmpy2_pow.txt b/test/test_gmpy2_pow.txt
139 -index 89bd876..d5b1f45 100644
140 ---- a/test/test_gmpy2_pow.txt
141 -+++ b/test/test_gmpy2_pow.txt
142 -@@ -15,9 +15,7 @@ mpz(25)
143 - >>> ctx.pow(z1, z2)
144 - mpz(25)
145 - >>> z1 ** -z2
146 --Traceback (most recent call last):
147 -- File "<stdin>", line 1, in <module>
148 --ValueError: pow() exponent cannot be negative
149 -+mpfr('0.040000000000000001')
150 - >>> z1 ** 0
151 - mpz(1)
152 - >>> mpz(0) ** 32
153 -diff --git a/test/test_gmpy2_xmpz_inplace.txt b/test/test_gmpy2_xmpz_inplace.txt
154 -index 94f86b7..c02f966 100644
155 ---- a/test/test_gmpy2_xmpz_inplace.txt
156 -+++ b/test/test_gmpy2_xmpz_inplace.txt
157 -@@ -135,7 +135,7 @@ xmpz(625)
158 - >>> x **= -2
159 - Traceback (most recent call last):
160 - File "<stdin>", line 1, in <module>
161 --TypeError: unsupported operand type(s) for ** or pow(): 'xmpz' and 'int'
162 -+ValueError: a non-negative value is required
163 - >>> x **= 2; x
164 - xmpz(390625)
165 - >>> x **= mpfr(2)
166
167 diff --git a/dev-python/gmpy/files/gmpy-2.1.0_beta5-pyhash-nan.patch b/dev-python/gmpy/files/gmpy-2.1.0_beta5-pyhash-nan.patch
168 deleted file mode 100644
169 index 9f59a6096fcd..000000000000
170 --- a/dev-python/gmpy/files/gmpy-2.1.0_beta5-pyhash-nan.patch
171 +++ /dev/null
172 @@ -1,17 +0,0 @@
173 -diff --git a/src/gmpy2_hash.c b/src/gmpy2_hash.c
174 -index f276a42..1d2bfd1 100644
175 ---- a/src/gmpy2_hash.c
176 -+++ b/src/gmpy2_hash.c
177 -@@ -147,7 +147,12 @@ _mpfr_hash(mpfr_t f)
178 - }
179 - }
180 - else {
181 -+#if PY_VERSION_HEX >= 0x030A00A0
182 -+ // Python 3.10
183 -+ return _Py_HashPointer(f);
184 -+#else
185 - return _PyHASH_NAN;
186 -+#endif
187 - }
188 - }
189 -
190
191 diff --git a/dev-python/gmpy/gmpy-2.1.0_beta5.ebuild b/dev-python/gmpy/gmpy-2.1.0_beta5.ebuild
192 deleted file mode 100644
193 index 4768bf50c719..000000000000
194 --- a/dev-python/gmpy/gmpy-2.1.0_beta5.ebuild
195 +++ /dev/null
196 @@ -1,45 +0,0 @@
197 -# Copyright 1999-2021 Gentoo Authors
198 -# Distributed under the terms of the GNU General Public License v2
199 -
200 -EAPI=7
201 -
202 -PYTHON_COMPAT=( python3_{8..10} )
203 -inherit distutils-r1
204 -
205 -MY_PN="${PN}2"
206 -MY_P="${MY_PN}-${PV/_beta/b}"
207 -
208 -DESCRIPTION="Python bindings for GMP, MPC, MPFR and MPIR libraries"
209 -HOMEPAGE="https://github.com/aleaxit/gmpy"
210 -SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
211 -S="${WORKDIR}"/${MY_P}
212 -
213 -LICENSE="LGPL-3+"
214 -SLOT="2"
215 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
216 -
217 -RDEPEND="
218 - >=dev-libs/mpc-1.0.2:=
219 - >=dev-libs/mpfr-3.1.2:=
220 - dev-libs/gmp:0=
221 -"
222 -DEPEND="${RDEPEND}"
223 -
224 -PATCHES=(
225 - # In python 3.10 _PyHASH_NAN was removed and its usage replaced with _Py_HashPointer
226 - # see https://github.com/python/cpython/blob/3.10/Python/pyhash.c
227 - # https://github.com/aleaxit/gmpy/pull/297
228 - "${FILESDIR}"/${P}-pyhash-nan.patch
229 - # The tests program asks for input when running, disable that
230 - "${FILESDIR}"/${P}-test-input.patch
231 - # Based on this commit:
232 - # https://github.com/aleaxit/gmpy/commit/db7ce2ef46fab84e7b9c32b05725e9b02e8cf206
233 - "${FILESDIR}"/${P}-failed-tests.patch
234 -)
235 -
236 -distutils_enable_sphinx docs
237 -
238 -python_test() {
239 - cd test || die
240 - "${EPYTHON}" runtests.py || die "tests failed under ${EPYTHON}"
241 -}