sighingnow / libclang

(Unofficial) Release libclang (clang.cindex) on pypi.
https://pypi.org/project/libclang
Other
81 stars 21 forks source link

Provide sources on Pypi #12

Closed hrw closed 3 years ago

hrw commented 3 years ago

For all those arch/os/libc combinations where you do not provide wheel files source tarball should be present on Pypi.

This allows anyone to build libclang with simple "pip install libclang" (assuming that all toolchains and libraries are present).

sighingnow commented 3 years ago

Not providing sources on pypi is intended, as the user will need to build the llvm & clang.

The original idea of the repo (and the package libclang) is, install a specified version of libclang.so (usually the latest version of libclang.so) is non-trivial on most systems, and, more importantly, installing libclang.so with system's package manager like apt-get, yum and brew brings tons of unnecessary things(usually 100+Mi) to download and install.

Thus we decide to package a prebuilt library into a wheel, which is only about 10Mi, and more importantly, it can be simply installed with a pip3 install libclang command, with any other dependent libraries to install, and even no extra network traffic to download tons of packages.

To make the package reliable and make the build process reproducible, we leverage github actions to build the library.

sighingnow commented 3 years ago

If we distribute source on pypi, that is definitely possible and doable, but,

  1. it means we need to include a LLVM+clang source distribution into the pypi package,
  2. users may require about 1 hour to build the shared library.

That why we don't provide such things and upload prebuilt package to pypi instead.

hrw commented 3 years ago

Makes sense.

sighingnow commented 3 years ago

If there is any need for packages of other ABIs, just let me know and I will try my best to upgrade a prebuilt one to pypi.

BTW happy to know this bundle work helps for other python developers :)