1 |
commit: d7f4cb5fb8d7eec20a09e272fc8870f6b92b4228 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 28 16:45:07 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 28 17:06:27 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7f4cb5f |
7 |
|
8 |
dev-python/python-lzo: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/python-lzo/Manifest | 1 - |
13 |
.../files/python-lzo-1.12-fix-py3.10.patch | 159 --------------------- |
14 |
dev-python/python-lzo/python-lzo-1.12-r2.ebuild | 34 ----- |
15 |
3 files changed, 194 deletions(-) |
16 |
|
17 |
diff --git a/dev-python/python-lzo/Manifest b/dev-python/python-lzo/Manifest |
18 |
index 161089c5e52d..68338d30a0d2 100644 |
19 |
--- a/dev-python/python-lzo/Manifest |
20 |
+++ b/dev-python/python-lzo/Manifest |
21 |
@@ -1,2 +1 @@ |
22 |
-DIST python-lzo-1.12.tar.gz 14042 BLAKE2B 7375e9b200a17cc1ad2c4dfdbe6491082af8d120b2b659b1e9bbff00eaae568e04dc12e5c13de3a028267a1e8e02bd1522a9335db73fa6a5a4ebc7ca4b341fff SHA512 811bdb282cfaf33427ad641d0342900c5af1f17b7033d76593288c3846b0feefe6ef93253152add97b2d6420f937de2745c8e7508dadf33e72b11545cac3be4d |
23 |
DIST python-lzo-1.14.tar.gz 14050 BLAKE2B e1df6b842562064ca13ddbacb194047ca343694d480a5a65e7d2876ec98a4215b4badb3b2a839f308dea8624c162a0536f363c093bcb2e5b48c68b69fb472729 SHA512 036cf7199afe12cec8b9c7ee92134f58357e1f892870ade3a619541a69c9cc92155892d53bd43330732b848016c2997e096a9a492e52f15d04fa516ca7645b93 |
24 |
|
25 |
diff --git a/dev-python/python-lzo/files/python-lzo-1.12-fix-py3.10.patch b/dev-python/python-lzo/files/python-lzo-1.12-fix-py3.10.patch |
26 |
deleted file mode 100644 |
27 |
index 17bad96d6278..000000000000 |
28 |
--- a/dev-python/python-lzo/files/python-lzo-1.12-fix-py3.10.patch |
29 |
+++ /dev/null |
30 |
@@ -1,159 +0,0 @@ |
31 |
-diff --git a/lzomodule.c b/lzomodule.c |
32 |
-index b5fa542..e9ca432 100644 |
33 |
---- a/lzomodule.c |
34 |
-+++ b/lzomodule.c |
35 |
-@@ -31,6 +31,8 @@ |
36 |
- |
37 |
- #define MODULE_VERSION "1.12" |
38 |
- |
39 |
-+#define PY_SSIZE_T_CLEAN |
40 |
-+ |
41 |
- #include <Python.h> |
42 |
- #include <lzo/lzo1x.h> |
43 |
- |
44 |
-@@ -83,7 +85,7 @@ compress(PyObject *dummy, PyObject *args) |
45 |
- lzo_uint in_len; |
46 |
- lzo_uint out_len; |
47 |
- lzo_uint new_len; |
48 |
-- int len; |
49 |
-+ Py_ssize_t len; |
50 |
- int level = 1; |
51 |
- int header = 1; |
52 |
- int err; |
53 |
-@@ -95,6 +97,16 @@ compress(PyObject *dummy, PyObject *args) |
54 |
- if (len < 0) |
55 |
- return NULL; |
56 |
- |
57 |
-+ if (len > LZO_UINT_MAX) { |
58 |
-+ PyErr_SetString(LzoError, "Input size is larger than LZO_UINT_MAX"); |
59 |
-+ return NULL; |
60 |
-+ } |
61 |
-+ |
62 |
-+ if ((len + len / 16 + 64 + 3) > LZO_UINT_MAX) { |
63 |
-+ PyErr_SetString(LzoError, "Output size is larger than LZO_UINT_MAX"); |
64 |
-+ return NULL; |
65 |
-+ } |
66 |
-+ |
67 |
- in_len = len; |
68 |
- out_len = in_len + in_len / 16 + 64 + 3; |
69 |
- |
70 |
-@@ -189,7 +201,7 @@ decompress(PyObject *dummy, PyObject *args) |
71 |
- lzo_uint in_len; |
72 |
- lzo_uint out_len; |
73 |
- lzo_uint new_len; |
74 |
-- int len; |
75 |
-+ Py_ssize_t len; |
76 |
- int buflen = -1; |
77 |
- int header = 1; |
78 |
- int err; |
79 |
-@@ -274,7 +286,7 @@ optimize(PyObject *dummy, PyObject *args) |
80 |
- lzo_uint in_len; |
81 |
- lzo_uint out_len; |
82 |
- lzo_uint new_len; |
83 |
-- int len; |
84 |
-+ Py_ssize_t len; |
85 |
- int err; |
86 |
- int header = 1; |
87 |
- int buflen = -1; |
88 |
-@@ -356,7 +368,7 @@ static PyObject * |
89 |
- adler32(PyObject *dummy, PyObject *args) |
90 |
- { |
91 |
- char *buf; |
92 |
-- int len; |
93 |
-+ Py_ssize_t len; |
94 |
- unsigned long val = 1; /* == lzo_adler32(0, NULL, 0); */ |
95 |
- |
96 |
- UNUSED(dummy); |
97 |
-@@ -392,7 +404,7 @@ static PyObject * |
98 |
- crc32(PyObject *dummy, PyObject *args) |
99 |
- { |
100 |
- char *buf; |
101 |
-- int len; |
102 |
-+ Py_ssize_t len; |
103 |
- unsigned long val = 0; /* == lzo_crc32(0, NULL, 0); */ |
104 |
- |
105 |
- UNUSED(dummy); |
106 |
-diff --git a/tests/test.py b/tests/test.py |
107 |
-index 9a96ce7..af761d9 100644 |
108 |
---- a/tests/test.py |
109 |
-+++ b/tests/test.py |
110 |
-@@ -96,11 +96,17 @@ def test_version(): |
111 |
- |
112 |
- def test_lzo(): |
113 |
- yield gen, b"aaaaaaaaaaaaaaaaaaaaaaaa" |
114 |
-- yield gen_raw, b"aaaaaaaaaaaaaaaaaaaaaaaa" |
115 |
- yield gen, b"abcabcabcabcabcabcabcabc" |
116 |
-- yield gen_raw, b"abcabcabcabcabcabcabcabc" |
117 |
- yield gen, b"abcabcabcabcabcabcabcabc", 9 |
118 |
-+ |
119 |
-+ |
120 |
-+def test_lzo_raw(): |
121 |
-+ yield gen_raw, b"aaaaaaaaaaaaaaaaaaaaaaaa" |
122 |
-+ yield gen_raw, b"abcabcabcabcabcabcabcabc" |
123 |
- yield gen_raw, b"abcabcabcabcabcabcabcabc", 9 |
124 |
-+ |
125 |
-+ |
126 |
-+def test_lzo_empty(): |
127 |
- yield gen, b"" |
128 |
- yield gen_raw, b"" |
129 |
- |
130 |
-@@ -113,41 +119,8 @@ def test_lzo_raw_big(): |
131 |
- gen_raw(b" " * 131072) |
132 |
- |
133 |
- |
134 |
--def main(args): |
135 |
-- # display version information and module documentation |
136 |
-- print("LZO version %s (0x%x), %s" % (lzo.LZO_VERSION_STRING, lzo.LZO_VERSION, lzo.LZO_VERSION_DATE)) |
137 |
-- print(lzo.__file__) |
138 |
-- print() |
139 |
-- print(lzo.__doc__) |
140 |
-- |
141 |
-- # display additional module information |
142 |
-- ## print dir(lzo) |
143 |
-- ## print_modinfo() |
144 |
-- |
145 |
-- # compress some simple strings |
146 |
-- gen(b"aaaaaaaaaaaaaaaaaaaaaaaa") |
147 |
-- gen_raw(b"aaaaaaaaaaaaaaaaaaaaaaaa") |
148 |
-- gen(b"abcabcabcabcabcabcabcabc") |
149 |
-- gen_raw(b"abcabcabcabcabcabcabcabc") |
150 |
-- gen(b"abcabcabcabcabcabcabcabc", level=9) |
151 |
-- gen_raw(b"abcabcabcabcabcabcabcabc", level=9) |
152 |
-- gen(b" " * 131072) |
153 |
-- gen_raw(b" " * 131072) |
154 |
-- gen(b"") |
155 |
-- gen_raw(b"") |
156 |
-- print("Simple compression test passed.") |
157 |
-- |
158 |
-- test_version() |
159 |
-- |
160 |
-- # force an exception (because of invalid compressed data) |
161 |
-- assert issubclass(lzo.error, Exception) |
162 |
-- try: |
163 |
-- x = lzo.decompress("xx") |
164 |
-- except lzo.error: |
165 |
-- pass |
166 |
-- else: |
167 |
-- print("Exception handling does NOT work !") |
168 |
-- return 0 |
169 |
-- |
170 |
--if __name__ == '__main__': |
171 |
-- sys.exit(main(sys.argv)) |
172 |
-+if sys.maxsize > 1<<32: |
173 |
-+ # This test raises OverflowError on 32-bit Pythons. Compressing |
174 |
-+ # this much data requires a 64-bit system. |
175 |
-+ def test_lzo_compress_extremely_big(): |
176 |
-+ b = lzo.compress(bytes(bytearray((1024**3)*2))) |
177 |
-diff --git a/tests/util.py b/tests/util.py |
178 |
-index 0a2f4ed..c7bd5f0 100644 |
179 |
---- a/tests/util.py |
180 |
-+++ b/tests/util.py |
181 |
-@@ -45,7 +45,7 @@ def get_sys_path(p=None): |
182 |
- if p: p0 = p[0] |
183 |
- # |
184 |
- plat = get_platform() |
185 |
-- plat_specifier = "%s-%s" % (plat, sys.version[:3]) |
186 |
-+ plat_specifier = "%s-%d.%d" % (plat, sys.version_info[0], sys.version_info[1]) |
187 |
- ##print plat, plat_specifier |
188 |
- # |
189 |
- for prefix in (p0, os.curdir, os.pardir,): |
190 |
|
191 |
diff --git a/dev-python/python-lzo/python-lzo-1.12-r2.ebuild b/dev-python/python-lzo/python-lzo-1.12-r2.ebuild |
192 |
deleted file mode 100644 |
193 |
index 505104db3542..000000000000 |
194 |
--- a/dev-python/python-lzo/python-lzo-1.12-r2.ebuild |
195 |
+++ /dev/null |
196 |
@@ -1,34 +0,0 @@ |
197 |
-# Copyright 1999-2021 Gentoo Authors |
198 |
-# Distributed under the terms of the GNU General Public License v2 |
199 |
- |
200 |
-EAPI=8 |
201 |
- |
202 |
-DISTUTILS_USE_SETUPTOOLS=no |
203 |
-PYTHON_COMPAT=( python3_{8..10} ) |
204 |
- |
205 |
-inherit distutils-r1 prefix |
206 |
- |
207 |
-DESCRIPTION="Python interface to lzo" |
208 |
-HOMEPAGE="https://github.com/jd-boyd/python-lzo" |
209 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
210 |
- |
211 |
-LICENSE="GPL-2" |
212 |
-SLOT="0" |
213 |
-KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" |
214 |
- |
215 |
-RDEPEND="dev-libs/lzo:2" |
216 |
-DEPEND="${RDEPEND}" |
217 |
- |
218 |
-# We can't use pytest at the moment because the package uses "yield tests" |
219 |
-# https://docs.pytest.org/en/6.2.x/deprecations.html#yield-tests |
220 |
-distutils_enable_tests --install nose |
221 |
- |
222 |
-PATCHES=( |
223 |
- # Upstream commits: 52440984, e63333e5, 15c40595 and 0a4272fc |
224 |
- "${FILESDIR}/${P}-fix-py3.10.patch" |
225 |
-) |
226 |
- |
227 |
-python_prepare_all() { |
228 |
- hprefixify setup.py |
229 |
- distutils-r1_python_prepare_all |
230 |
-} |