commit:     3ea0e38bb8c5959590c9c3311307a82ce3829e47
Author:     Michael Schubert <mschu.dev <AT> gmail <DOT> com>
AuthorDate: Tue Jul 16 12:24:03 2024 +0000
Commit:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
CommitDate: Thu Feb  6 13:07:01 2025 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=3ea0e38b

dev-python/llvmlite: add ebuild

Signed-off-by: Michael Schubert <mschu.dev <AT> gmail.com>
Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org>

 dev-python/llvmlite/llvmlite-0.44.0.ebuild | 41 ++++++++++++++++++++++++++++++
 dev-python/llvmlite/metadata.xml           | 16 ++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/dev-python/llvmlite/llvmlite-0.44.0.ebuild 
b/dev-python/llvmlite/llvmlite-0.44.0.ebuild
new file mode 100644
index 000000000..f81f98418
--- /dev/null
+++ b/dev-python/llvmlite/llvmlite-0.44.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+LLVM_COMPAT=( 16 )
+inherit cmake distutils-r1 llvm-r1
+
+DESCRIPTION="Python wrapper around the llvm C++ library"
+HOMEPAGE="https://github.com/numba/llvmlite";
+SRC_URI="https://github.com/numba/llvmlite/archive/refs/tags/v${PV}.tar.gz -> 
${P}.gh.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+       sys-libs/zlib:0=
+       $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}=')
+"
+DEPEND="${RDEPEND}"
+
+distutils_enable_tests pytest
+
+python_compile() {
+       LLVM_CONFIG="$(get_llvm_prefix)/bin/llvm-config" 
distutils-r1_python_compile
+}
+
+python_test() {
+       LD_LIBRARY_PATH="$(get_llvm_prefix)/$(get_libdir)" \
+               "${EPYTHON}" runtests.py -v || die "tests failed for ${EPYTHON}"
+}
+
+python_install() {
+       distutils-r1_python_install
+       dosym "$(get_llvm_prefix)/$(get_libdir)/libLLVM-${LLVM_SLOT}.so" \
+               "$(python_get_sitedir)/llvmlite/binding/libLLVM-${LLVM_SLOT}.so"
+}

diff --git a/dev-python/llvmlite/metadata.xml b/dev-python/llvmlite/metadata.xml
new file mode 100644
index 000000000..22f9bb536
--- /dev/null
+++ b/dev-python/llvmlite/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>s...@gentoo.org</email>
+               <name>Gentoo Science Project</name>
+       </maintainer>
+       <maintainer type="person">
+               <email>mschu....@gmail.com</email>
+               <name>Michael Schubert</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">numba/llvmlite</remote-id>
+               <remote-id type="pypi">llvmlite</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to