Accepting request 209362 from home:termim:branches:devel:tools:compiler

install python bindings to libclang

OBS-URL: https://build.opensuse.org/request/show/209362
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=309
This commit is contained in:
Ismail Dönmez 2013-12-04 08:20:44 +00:00 committed by Git OBS Bridge
parent 89cfd8346f
commit 3e20cc1861
2 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Dec 4 03:27:29 UTC 2013 - termim@gmail.com
- install python binding to libclang
-------------------------------------------------------------------
Mon Dec 1 08:42:08 UTC 2013 - idonmez@suse.com

View File

@ -140,6 +140,15 @@ Requires: vim
%description vim-plugins
This package contains vim plugins for LLVM like syntax highlighting.
%package -n python-clang
Summary: Python bindings for libclang
Group: Development/Languages/Python
Requires: libclang = %{version}
Requires: python
%description -n python-clang
This package contains the Python bindings to clang (C language) frontend for LLVM.
%prep
%setup -q -n %{name}
%patch1 -p1
@ -337,6 +346,16 @@ for file in scan-view/Resources/*; do
install -m 644 $file %{buildroot}%{py_sitedir}/Resources/
done
popd
# install python bindings
install -d %{buildroot}%{py_sitedir}/clang
pushd tools/clang/bindings/python
cp clang/*.py %{buildroot}%{py_sitedir}/clang
install -d %{buildroot}%{_docdir}/python-clang/examples/cindex
cp -r examples %{buildroot}%{_docdir}/python-clang
install -d %{buildroot}%{_docdir}/python-clang/tests/cindex/INPUTS
cp -r tests %{buildroot}%{_docdir}/python-clang
popd
pushd %{buildroot}%{_bindir}
ln -s ccc-analyzer c++-analyzer
popd
@ -468,4 +487,13 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
%doc utils/vim/README.vim
%{_datadir}/vim/
%files -n python-clang
%defattr(-,root,root)
%{py_sitedir}/clang
%{py_sitedir}/clang/__init__.py
%{py_sitedir}/clang/cindex.py
%{py_sitedir}/clang/enumerations.py
%doc %{_docdir}/python-clang
%changelog