pybind / pybind/pybind11

Package a independant c++ codebase that already generate a shared lib using cmake to a python package

Open
#4,334 0 comments 0 reactions 0 assignees View on GitHub

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:

Area-2022-11-14_11:58:55

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:

Area-2022-11-14_12:06:17

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.