dev-python/clang - 22.1.4-r1 (gentoo)

Search

Install

Install this version:

emerge -a =dev-python/clang-22.1.4-r1

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-python/clang-22.1.4-r1

Or alternatively:

emerge --autounmask-write -a =dev-python/clang-22.1.4-r1

Package Information

Description:
Python bindings for llvm-core/clang
Homepage:
https://llvm.org/
License:
Apache-2.0-with-LLVM-exceptions UoI-NCSA

Ebuild Details

Version EAPI Keywords Slot
22.1.4-r1 8 ~amd64 ~arm ~arm64 ~x86 0
View Raw Ebuild
# 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"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
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
}

USE Flags

Manage flags for this package: euse -i <flag> -p dev-python/clang | euse -E <flag> -p dev-python/clang | euse -D <flag> -p dev-python/clang

Global/Standard Flags

Inherited Eclasses

Dependencies

DEPEND

	>=llvm-core/clang-22.1.4-r1:*
	!llvm-core/llvm:0[clang(-),python(-)]
	!llvm-core/clang:0[python(-)]

RDEPEND

	
	>=llvm-core/clang-22.1.4-r1:*
	!llvm-core/llvm:0[clang(-),python(-)]
	!llvm-core/clang:0[python(-)]

	

BDEPEND

	
	dev-python/hatch-vcs[]
	test? (
		llvm-core/clang:
	)