Package a independant c++ codebase that already generate a shared lib using cmake to a python package
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
Discussed in https://github.com/pybind/pybind11/discussions/4331
Originally posted by Tomcat-42 November 14, 2022
First of all, Hello friends!!! 👋
Despite knowing this is more of a pip build systems issue rather than a pybind itself one, I think someone here might have encountered a simillar issue and can help me.
I have two separate repositories: libdaa and daa . The first one, libdaa , is a c++ code base that generates various targets. One of those targets, daa.so, is a pybind11 python module. I can build this target using CMake (or plain make), and use daa.so correctly as a python module. The next picture shows libdaa repo:

The second repo, daa, is intended to be a pip package that wraps daa.so (built on libdaa repo) and will be published on PyPi. Here, I have libdaa repo as a submodule on daa/libdaa. The picture shows this:

Said that, how can I configure daa repo for building the daa.so target that is inside the daa/libdaa repo as a python package?
Thanks, Pablo.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the daa repository layout and its libdaa submodule, then inspect how the CMake target daa.so is currently generated. Determine how the target can be built and included in the pip package, with a result that can be published to PyPI and imported as a Python module.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- backend, build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100