[cfe-dev] Clang Python bindings missing from installation ?

Jonathan Coe via cfe-dev cfe-dev at lists.llvm.org
Thu Jan 16 06:34:15 PST 2020


Python bindings work using libclang (a C library) and a few python source
files. Copying the files you identified into your python path (which may
depend on your python version) should suffice.

Regards,

Jon

On Thu, 16 Jan 2020 at 11:54, Gordon McConnell via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi Clang experts,
>
>
>
> We already use clang to build our code, but would now additionally like to
> make use of clang’s python bindings to write some custom python scripts to
> check certain aspects of our C++ code.
>
>
>
> Problem is, that my clang/llvm 7.1.0 *installations* do not contain the
> necessary files for this.  The download of *sources* for my builds of
> clang DO contain the necessary files - under
> <SRC_TOP>/llvm/tools/clang/bindings/python/clang/  I have:
>
> __init__.py
>
> cindex.py
>
> enumerations.py
>
> but when the build and install steps are done, these files do not get
> carried over to the installation DESTDIR
>
>
>
> I’ve spent a while looking to see whether there is some configuration
> setting that needs to be done at the cmake level, to get the content copied
> over from the download location, to the installation. Nothing found. (I see
> ways to control whether bindings for Go / OCaml should be enabled /
> disabled, but nothing for Python).
>
>
>
> Can one of you please advise what the correct way is to get the bindings
> included in the installation ?  e.g.
>
>    - is there a “-D<setting>=<value>” option that I should be passing to
>    cmake ?
>    - or should I perhaps be manually updating one of the CMakeLists.txt
>    files somehow ?
>    - or should I simply manually copy the above files to somewhere under
>    the installation DESTDIR after the fact ? (If so, is there a recommended
>    location ?)
>
>
>
> Thanks a lot for any light you can shed here.
>
>
>
> Regards,
>
>     Gordon
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200116/582c350f/attachment.html>


More information about the cfe-dev mailing list