Add option to install clang python bindings to llvm (#5774)
This commit is contained in:
parent
89b0a09de0
commit
306f536138
@ -73,6 +73,8 @@ class Llvm(CMakePackage):
|
|||||||
variant('build_type', default='Release',
|
variant('build_type', default='Release',
|
||||||
description='CMake build type',
|
description='CMake build type',
|
||||||
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'))
|
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'))
|
||||||
|
variant('python', default=False, description="Install python bindings")
|
||||||
|
extends('python', when='+python')
|
||||||
|
|
||||||
# Build dependency
|
# Build dependency
|
||||||
depends_on('cmake@3.4.3:', type='build')
|
depends_on('cmake@3.4.3:', type='build')
|
||||||
@ -429,5 +431,10 @@ def cmake_args(self):
|
|||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
def post_install(self):
|
def post_install(self):
|
||||||
|
if '+clang' in self.spec and '+python' in self.spec:
|
||||||
|
install_tree(
|
||||||
|
'tools/clang/bindings/python/clang',
|
||||||
|
join_path(site_packages_dir, 'clang'))
|
||||||
|
|
||||||
with working_dir(self.build_directory):
|
with working_dir(self.build_directory):
|
||||||
install_tree('bin', join_path(self.prefix, 'libexec', 'llvm'))
|
install_tree('bin', join_path(self.prefix, 'libexec', 'llvm'))
|
||||||
|
Loading…
Reference in New Issue
Block a user