Migrate libclang compiled libraries PyPI package to LLVM monorepo
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
This is an issue to track the things that need to happen to move the [libclang PyPI package](https://pypi.org/project/libclang/) into the LLVM monorepo from its current home at https://github.com/sighingnow/libclang
The primary distinction between the libclang and clang packages on PyPI is that libclang supplies pre-compiled copies of libclang for a variety of OS/CPU combinations, and doesn't have a pure Python variant for people on unsupported platforms.
To avoid publishing duplicate bindings under different packaging, I'm thinking we can:
- Keep the clang package as being the pure Python bindings
- Remove the duplicate Python bindings (*.py files) that the libclang package currently bundles, making it native libraries only with clang as a dependency to supply the *.py files
This should make so existing users of each continue to get what they expect, with the `libclang` package continuing to act as a convenient way for users to get a "batteries included" dependency on most common platforms while consolidating the pure Python binding code into one package.
- [ ] Adapt the cibuildwheel setup for building libclang wheels from https://github.com/nightlark/libclang/tree/migrate-to-cibuildwheel to the LLVM monorepo
- [x] Figure out how to best upstream the patches libclang applies to cindex.py in https://github.com/sighingnow/libclang/blob/master/scripts/data/clang_bindings.patch
- [x] @sighingnow transfer ownership of the libclang PyPI package to @boomanaiden154 or @tstellar so they can add it to the [LLVM PyPI org](https://pypi.org/org/LLVM/)
- [ ] Set up trusted publishing for the libclang PyPI package to use the release-libclang-pypi.yml file in the LLVM monorepo (@tstellar or @boomanaiden154)
- [ ] Add a workflow call to the release-libclang-pypi.yml file in [release-tasks.yml](https://github.com/llvm/llvm-project/blob/main/.github/workflows/release-tasks.yml) (this should happen after everything else is set up)
Some discussion about transferring PyPI packages to the LLVM org on PyPI can be found at: https://discourse.llvm.org/t/moving-projects-into-the-llvm-org-on-pypi/88868
Contributor guide
Research direction
Start by reviewing the cibuildwheel setup on the migrate-to-cibuildwheel branch, then read release-libclang-pypi.yml and .github/workflows/release-tasks.yml. Map the remaining checklist items, including trusted publishing and the workflow call; the migration is done when libclang wheels can be built and its PyPI release workflow is connected without duplicate bindings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python
- Domain
- build-system, ci-cd, release
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100