Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: dev-python/llvmlite/, dev-python/llvmlite/files/
Date: Sun, 07 Aug 2022 09:07:47
Message-Id: 1659863214.d2f198644a8ad262dc36fc03e4076f44a4303a31.andrewammerlaan@gentoo
1 commit: d2f198644a8ad262dc36fc03e4076f44a4303a31
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 7 09:06:54 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 7 09:06:54 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=d2f19864
7
8 dev-python/llvmlite: drop 0.37.0-r1, 0.38.0-r1
9
10 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
11
12 .../llvmlite/files/llvmlite-0.37.0-llvm12.patch | 91 ---------------------
13 .../llvmlite/files/llvmlite-0.38.0-llvm12.patch | 92 ----------------------
14 dev-python/llvmlite/llvmlite-0.37.0-r1.ebuild | 62 ---------------
15 dev-python/llvmlite/llvmlite-0.38.0-r1.ebuild | 62 ---------------
16 4 files changed, 307 deletions(-)
17
18 diff --git a/dev-python/llvmlite/files/llvmlite-0.37.0-llvm12.patch b/dev-python/llvmlite/files/llvmlite-0.37.0-llvm12.patch
19 deleted file mode 100644
20 index ed104ab99..000000000
21 --- a/dev-python/llvmlite/files/llvmlite-0.37.0-llvm12.patch
22 +++ /dev/null
23 @@ -1,91 +0,0 @@
24 -From 1d928ebcd59b23b5050234a2bf71f9be7f5f6bd1 Mon Sep 17 00:00:00 2001
25 -From: Richard Barnes <rbarnes@×××.edu>
26 -Date: Wed, 1 Dec 2021 10:29:08 -0700
27 -Subject: [PATCH] Enable LLVM-12 and LLVM-13
28 -
29 ----
30 - ffi/build.py | 5 ++---
31 - ffi/targets.cpp | 2 ++
32 - llvmlite/tests/test_binding.py | 19 ++++++++++++++++---
33 - 3 files changed, 20 insertions(+), 6 deletions(-)
34 -
35 -diff --git a/ffi/build.py b/ffi/build.py
36 -index 6408bf5f..95e33c64 100755
37 ---- a/ffi/build.py
38 -+++ b/ffi/build.py
39 -@@ -162,9 +162,8 @@ def main_posix(kind, library_ext):
40 - print(msg)
41 - print(warning + '\n')
42 - else:
43 --
44 -- if not out.startswith('11'):
45 -- msg = ("Building llvmlite requires LLVM 11.x.x, got "
46 -+ if not (out.startswith('11') or out.startswith('12') or out.startswith('13')):
47 -+ msg = ("Building llvmlite requires LLVM 11-13.x.x, got "
48 - "{!r}. Be sure to set LLVM_CONFIG to the right executable "
49 - "path.\nRead the documentation at "
50 - "http://llvmlite.pydata.org/ for more information about "
51 -diff --git a/ffi/targets.cpp b/ffi/targets.cpp
52 -index 1ce472c2..4ba33e79 100644
53 ---- a/ffi/targets.cpp
54 -+++ b/ffi/targets.cpp
55 -@@ -233,6 +233,8 @@ LLVMPY_CreateTargetMachine(LLVMTargetRef T,
56 - rm = Reloc::DynamicNoPIC;
57 -
58 - TargetOptions opt;
59 -+#if LLVM_VERSION_MAJOR < 12
60 - opt.PrintMachineCode = PrintMC;
61 -+#endif
62 -
63 - bool jit = JIT;
64 -diff --git a/llvmlite/tests/test_binding.py b/llvmlite/tests/test_binding.py
65 -index 80495787..fee2372a 100644
66 ---- a/llvmlite/tests/test_binding.py
67 -+++ b/llvmlite/tests/test_binding.py
68 -@@ -18,6 +18,16 @@
69 - from llvmlite.tests import TestCase
70 -
71 -
72 -+def clean_string_whitespace(x: str) -> str:
73 -+ # Remove trailing whitespace from the end of each line
74 -+ x = re.sub(r"\s+$", "", x, flags=re.MULTILINE)
75 -+ # Remove intermediate blank lines
76 -+ x = re.sub(r"\n\s*\n", r"\n", x, flags=re.MULTILINE)
77 -+ # Remove extraneous whitespace from the beginning and end of the string
78 -+ x = x.strip()
79 -+ return x
80 -+
81 -+
82 - # arvm7l needs extra ABI symbols to link successfully
83 - if platform.machine() == 'armv7l':
84 - llvm.load_library_permanently('libgcc_s.so.1')
85 -@@ -158,7 +168,7 @@ def no_de_locale():
86 - target triple = "unknown-unknown-unknown"
87 - target datalayout = ""
88 -
89 --define i32 @"foo"()
90 -+define i32 @"foo"()
91 - {
92 - "<>!*''#":
93 - ret i32 12345
94 -@@ -424,7 +434,10 @@ def test_nonalphanum_block_name(self):
95 - bd = ir.IRBuilder(fn.append_basic_block(name="<>!*''#"))
96 - bd.ret(ir.Constant(ir.IntType(32), 12345))
97 - asm = str(mod)
98 -- self.assertEqual(asm, asm_nonalphanum_blocklabel)
99 -+ self.assertEqual(
100 -+ clean_string_whitespace(asm),
101 -+ clean_string_whitespace(asm_nonalphanum_blocklabel)
102 -+ )
103 -
104 - def test_global_context(self):
105 - gcontext1 = llvm.context.get_global_context()
106 -@@ -509,7 +522,7 @@ def test_set_option(self):
107 - def test_version(self):
108 - major, minor, patch = llvm.llvm_version_info
109 - # one of these can be valid
110 -- valid = [(11,)]
111 -+ valid = [(11,), (12,), (13,)]
112 - self.assertIn((major,), valid)
113 - self.assertIn(patch, range(10))
114 -
115
116 diff --git a/dev-python/llvmlite/files/llvmlite-0.38.0-llvm12.patch b/dev-python/llvmlite/files/llvmlite-0.38.0-llvm12.patch
117 deleted file mode 100644
118 index 6630652c2..000000000
119 --- a/dev-python/llvmlite/files/llvmlite-0.38.0-llvm12.patch
120 +++ /dev/null
121 @@ -1,92 +0,0 @@
122 -From 1d928ebcd59b23b5050234a2bf71f9be7f5f6bd1 Mon Sep 17 00:00:00 2001
123 -From: Richard Barnes <rbarnes@×××.edu>
124 -Date: Wed, 1 Dec 2021 10:29:08 -0700
125 -Subject: [PATCH] Enable LLVM-12 and LLVM-13
126 -
127 ----
128 - ffi/build.py | 5 ++---
129 - ffi/targets.cpp | 2 ++
130 - llvmlite/tests/test_binding.py | 19 ++++++++++++++++---
131 - 3 files changed, 20 insertions(+), 6 deletions(-)
132 -
133 -diff --git a/ffi/build.py b/ffi/build.py
134 -index 6408bf5f..95e33c64 100755
135 ---- a/ffi/build.py
136 -+++ b/ffi/build.py
137 -@@ -162,9 +162,8 @@ def main_posix(kind, library_ext):
138 - print(msg)
139 - print(warning + '\n')
140 - else:
141 --
142 -- if not out.startswith('11'):
143 -- msg = ("Building llvmlite requires LLVM 11.x.x, got "
144 -+ if not (out.startswith('11') or out.startswith('12') or out.startswith('13')):
145 -+ msg = ("Building llvmlite requires LLVM 11-13.x.x, got "
146 - "{!r}. Be sure to set LLVM_CONFIG to the right executable "
147 - "path.\nRead the documentation at "
148 - "http://llvmlite.pydata.org/ for more information about "
149 -diff --git a/ffi/targets.cpp b/ffi/targets.cpp
150 -index 1ce472c2..4ba33e79 100644
151 ---- a/ffi/targets.cpp
152 -+++ b/ffi/targets.cpp
153 -@@ -233,7 +233,9 @@ LLVMPY_CreateTargetMachine(LLVMTargetRef T,
154 - rm = Reloc::DynamicNoPIC;
155 -
156 - TargetOptions opt;
157 -+#if LLVM_VERSION_MAJOR < 12
158 - opt.PrintMachineCode = PrintMC;
159 -+#endif
160 - opt.MCOptions.ABIName = ABIName;
161 -
162 - bool jit = JIT;
163 -diff --git a/llvmlite/tests/test_binding.py b/llvmlite/tests/test_binding.py
164 -index 80495787..fee2372a 100644
165 ---- a/llvmlite/tests/test_binding.py
166 -+++ b/llvmlite/tests/test_binding.py
167 -@@ -18,6 +18,16 @@
168 - from llvmlite.tests import TestCase
169 -
170 -
171 -+def clean_string_whitespace(x: str) -> str:
172 -+ # Remove trailing whitespace from the end of each line
173 -+ x = re.sub(r"\s+$", "", x, flags=re.MULTILINE)
174 -+ # Remove intermediate blank lines
175 -+ x = re.sub(r"\n\s*\n", r"\n", x, flags=re.MULTILINE)
176 -+ # Remove extraneous whitespace from the beginning and end of the string
177 -+ x = x.strip()
178 -+ return x
179 -+
180 -+
181 - # arvm7l needs extra ABI symbols to link successfully
182 - if platform.machine() == 'armv7l':
183 - llvm.load_library_permanently('libgcc_s.so.1')
184 -@@ -158,7 +168,7 @@ def no_de_locale():
185 - target triple = "unknown-unknown-unknown"
186 - target datalayout = ""
187 -
188 --define i32 @"foo"()
189 -+define i32 @"foo"()
190 - {
191 - "<>!*''#":
192 - ret i32 12345
193 -@@ -424,7 +434,10 @@ def test_nonalphanum_block_name(self):
194 - bd = ir.IRBuilder(fn.append_basic_block(name="<>!*''#"))
195 - bd.ret(ir.Constant(ir.IntType(32), 12345))
196 - asm = str(mod)
197 -- self.assertEqual(asm, asm_nonalphanum_blocklabel)
198 -+ self.assertEqual(
199 -+ clean_string_whitespace(asm),
200 -+ clean_string_whitespace(asm_nonalphanum_blocklabel)
201 -+ )
202 -
203 - def test_global_context(self):
204 - gcontext1 = llvm.context.get_global_context()
205 -@@ -509,7 +522,7 @@ def test_set_option(self):
206 - def test_version(self):
207 - major, minor, patch = llvm.llvm_version_info
208 - # one of these can be valid
209 -- valid = [(11,)]
210 -+ valid = [(11,), (12,), (13,)]
211 - self.assertIn((major,), valid)
212 - self.assertIn(patch, range(10))
213 -
214
215 diff --git a/dev-python/llvmlite/llvmlite-0.37.0-r1.ebuild b/dev-python/llvmlite/llvmlite-0.37.0-r1.ebuild
216 deleted file mode 100644
217 index 607c1bb0b..000000000
218 --- a/dev-python/llvmlite/llvmlite-0.37.0-r1.ebuild
219 +++ /dev/null
220 @@ -1,62 +0,0 @@
221 -# Copyright 1999-2022 Gentoo Authors
222 -# Distributed under the terms of the GNU General Public License v2
223 -
224 -EAPI=7
225 -
226 -PYTHON_COMPAT=( python3_{8..10} )
227 -inherit distutils-r1 llvm
228 -
229 -DESCRIPTION="Python wrapper around the llvm C++ library"
230 -HOMEPAGE="https://llvmlite.pydata.org/"
231 -SRC_URI="https://github.com/numba/llvmlite/archive/v${PV/_/}.tar.gz -> ${P/_/}.gh.tar.gz"
232 -S="${WORKDIR}/${P/_/}"
233 -
234 -LICENSE="BSD"
235 -SLOT="0"
236 -KEYWORDS="~amd64 ~arm ~arm64 ~x86"
237 -IUSE="examples"
238 -
239 -LLVM_MAX_SLOT=12
240 -
241 -RDEPEND="
242 - sys-devel/llvm:${LLVM_MAX_SLOT}
243 - sys-libs/zlib:0=
244 -"
245 -DEPEND="${RDEPEND}"
246 -
247 -PATCHES=( "${FILESDIR}/${P}-llvm12.patch" )
248 -
249 -src_prepare() {
250 - sed -i -e '/max_python/s:3\.10:3.11:' setup.py || die
251 - distutils-r1_src_prepare
252 -}
253 -
254 -python_configure_all() {
255 - # upstream's build system is just horrible, and they ignored the PR
256 - # fixing it, so let's build the shared lib properly using implicit
257 - # make rules
258 -
259 - export LDLIBS=$(llvm-config --libs all)
260 - export CXXFLAGS="$(llvm-config --cxxflags) -fPIC ${CXXFLAGS}"
261 - export LDFLAGS="$(llvm-config --ldflags) ${LDFLAGS}"
262 -
263 - local files=( ffi/*.cpp )
264 - emake -f - <<EOF
265 -ffi/libllvmlite.so: ${files[*]/.cpp/.o}
266 - \$(CXX) -shared \$(CXXFLAGS) \$(LDFLAGS) -o \$@ \$^ \$(LDLIBS)
267 -EOF
268 -
269 - export LLVMLITE_SKIP_LLVM_VERSION_CHECK=1
270 -}
271 -
272 -python_test() {
273 - "${EPYTHON}" runtests.py -v || die "Tests failed under ${EPYTHON}"
274 -}
275 -
276 -python_install_all() {
277 - distutils-r1_python_install_all
278 - if use examples; then
279 - dodoc -r examples
280 - docompress -x /usr/share/doc/${PF}/examples
281 - fi
282 -}
283
284 diff --git a/dev-python/llvmlite/llvmlite-0.38.0-r1.ebuild b/dev-python/llvmlite/llvmlite-0.38.0-r1.ebuild
285 deleted file mode 100644
286 index 607c1bb0b..000000000
287 --- a/dev-python/llvmlite/llvmlite-0.38.0-r1.ebuild
288 +++ /dev/null
289 @@ -1,62 +0,0 @@
290 -# Copyright 1999-2022 Gentoo Authors
291 -# Distributed under the terms of the GNU General Public License v2
292 -
293 -EAPI=7
294 -
295 -PYTHON_COMPAT=( python3_{8..10} )
296 -inherit distutils-r1 llvm
297 -
298 -DESCRIPTION="Python wrapper around the llvm C++ library"
299 -HOMEPAGE="https://llvmlite.pydata.org/"
300 -SRC_URI="https://github.com/numba/llvmlite/archive/v${PV/_/}.tar.gz -> ${P/_/}.gh.tar.gz"
301 -S="${WORKDIR}/${P/_/}"
302 -
303 -LICENSE="BSD"
304 -SLOT="0"
305 -KEYWORDS="~amd64 ~arm ~arm64 ~x86"
306 -IUSE="examples"
307 -
308 -LLVM_MAX_SLOT=12
309 -
310 -RDEPEND="
311 - sys-devel/llvm:${LLVM_MAX_SLOT}
312 - sys-libs/zlib:0=
313 -"
314 -DEPEND="${RDEPEND}"
315 -
316 -PATCHES=( "${FILESDIR}/${P}-llvm12.patch" )
317 -
318 -src_prepare() {
319 - sed -i -e '/max_python/s:3\.10:3.11:' setup.py || die
320 - distutils-r1_src_prepare
321 -}
322 -
323 -python_configure_all() {
324 - # upstream's build system is just horrible, and they ignored the PR
325 - # fixing it, so let's build the shared lib properly using implicit
326 - # make rules
327 -
328 - export LDLIBS=$(llvm-config --libs all)
329 - export CXXFLAGS="$(llvm-config --cxxflags) -fPIC ${CXXFLAGS}"
330 - export LDFLAGS="$(llvm-config --ldflags) ${LDFLAGS}"
331 -
332 - local files=( ffi/*.cpp )
333 - emake -f - <<EOF
334 -ffi/libllvmlite.so: ${files[*]/.cpp/.o}
335 - \$(CXX) -shared \$(CXXFLAGS) \$(LDFLAGS) -o \$@ \$^ \$(LDLIBS)
336 -EOF
337 -
338 - export LLVMLITE_SKIP_LLVM_VERSION_CHECK=1
339 -}
340 -
341 -python_test() {
342 - "${EPYTHON}" runtests.py -v || die "Tests failed under ${EPYTHON}"
343 -}
344 -
345 -python_install_all() {
346 - distutils-r1_python_install_all
347 - if use examples; then
348 - dodoc -r examples
349 - docompress -x /usr/share/doc/${PF}/examples
350 - fi
351 -}