Install python modules

This commit is contained in:
2025-12-05 10:38:23 +02:00
parent a5dc1a00f6
commit c034a4881f
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -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
+7
View File
@@ -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
}