Skip to content

Commit

Permalink
dev-python/llvmlite: add ebuild
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Schubert <[email protected]>
  • Loading branch information
mschubert committed Jan 25, 2025
1 parent 1b32a97 commit 41facde
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-python/llvmlite/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST llvmlite-0.44.0.gh.tar.gz 285270 BLAKE2B 701ebb4835b333eeccaf9d74596d394006804b279e03bf8484a06d9333056a02d8128eb615cf1fb56205e387839e14ac91e927cfb7ae5547c57b6946abccc1d4 SHA512 4e4cb492957a853d63204ebed8a4ffb404f973ec373680897ea1ea3abc74caf36821d82c28de0fefce93767b59c55a5aff7bb136f9aa65b0bc4c41054815ec33
41 changes: 41 additions & 0 deletions dev-python/llvmlite/llvmlite-0.44.0.ebuild
Original file line number Diff line number Diff line change
@@ -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)/lib64" \
"${EPYTHON}" runtests.py -v || die "tests failed for ${EPYTHON}"
}

python_install() {
distutils-r1_python_install
dosym "$(get_llvm_prefix)/lib64/libLLVM-${LLVM_SLOT}.so" \
/usr/lib/$EPYTHON/site-packages/llvmlite/binding/libLLVM-${LLVM_SLOT}.so
}
16 changes: 16 additions & 0 deletions dev-python/llvmlite/metadata.xml
Original file line number Diff line number Diff line change
@@ -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>[email protected]</email>
<name>Gentoo Science Project</name>
</maintainer>
<maintainer type="person">
<email>[email protected]</email>
<name>Michael Schubert</name>
</maintainer>
<upstream>
<remote-id type="github">numba/llvmlite</remote-id>
<remote-id type="pypi">llvmlite</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit 41facde

Please sign in to comment.