Files
gentoo/dev-python/clang/clang-23.0.0.9999.ebuild
Alfred Wingate bb47cc5b1b dev-python/clang: use upstream packaging for python bindings
Upstream commit: e6f2fbb0fa6b519643916e11552c88d680958ede

Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/755
Merges: https://codeberg.org/gentoo/gentoo/pulls/755
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2026-04-27 14:19:34 +02:00

50 lines
1.1 KiB
Bash

# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( python3_{11..14} )
inherit distutils-r1 llvm.org
DESCRIPTION="Python bindings for llvm-core/clang"
HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# The module is opening libclang.so directly, and doing some blasphemy
# on top of it.
DEPEND="
>=llvm-core/clang-${PV}:*
!llvm-core/llvm:0[clang(-),python(-)]
!llvm-core/clang:0[python(-)]
"
RDEPEND="
${DEPEND}
${PYTHON_DEPS}
"
BDEPEND="
${PYTHON_DEPS}
dev-python/hatch-vcs[${PYTHON_USEDEP}]
test? (
llvm-core/clang:${LLVM_MAJOR}
)
"
LLVM_COMPONENTS=( clang/{bindings/python,include} )
llvm.org_set_globals
distutils_enable_tests unittest
python_test() {
# tests rely on results from a specific clang version, so override
# the search path
local -x CLANG_LIBRARY_PATH=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)
local -x CLANG_NO_DEFAULT_CONFIG=1
eunittest
}