From c034a4881fb77c8aababf779e9e95e0492fbfc67 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Fri, 5 Dec 2025 10:38:23 +0200 Subject: [PATCH] Install python modules --- pkg.info | 2 +- source.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg.info b/pkg.info index dc13ce2..3512079 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: llvm description: A collection of modular and reusable compiler and toolchain technologies version: 21.1.6 -revision: 1 +revision: 2 url: https://llvm.org license: Apache2-with-llvm-exception architecture: any diff --git a/source.sh b/source.sh index a5fe501..88c1eca 100644 --- a/source.sh +++ b/source.sh @@ -61,6 +61,7 @@ package_llvm() { # Move clang files into split package _pick clang usr/bin/{amdgpu-arch,analyze-build,c-index-test,diagtool,git-clang-format,hmaptool,intercept-build,nvptx-arch,scan-build,scan-build-py,scan-view} + _pick clang usr/lib/{libear,libscanbuild} _pick clang usr/bin/clang* _pick clang usr/lib/libclang* _pick clang usr/lib/cmake/clang @@ -92,6 +93,12 @@ package_compiler-rt() { } package_clang() { + # Move libear and libscanbuild into site-packages and install Python bindings + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + install -d "$BPM_OUTPUT"/"$site_packages" + mv "$BPM_OUTPUT"/usr/lib/{libear,libscanbuild} -t "$BPM_OUTPUT"/"$site_packages" + cp -a "$BPM_SOURCE"/tools/clang/bindings/python/clang "$BPM_OUTPUT"/"$site_packages" + # Install package license install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/clang/LICENSE.TXT }