pybind / pybind/pybind11

Guidelines for packaging projects using pybind11

Open
#1,430 11 comments 24 reactions 1 assignee View on GitHub

@henryiii is already working on this.

Since Aug 8, 2020.

build system
Dominant language
C++
Stars
18k
Forks
2.3k
Avg merge
5d 17h
Merged PRs (30d)
10

Description

Hi,
I am greatly enjoying using pybind11. I am not sure if this question goes beyond the scope of this project, but I am sure I am not the only person dealing with this issue.

I have a mixed C++ / Python project, mainly a C++ library, a wrapper for this library using pybind11, some additional library functionality in pure python, using the pybind11 module, and lots of tests and usage samples in both C++ and Python.

So now, how can I properly package my library / SDK? The C++ part is easy, use CMake to build, and install/package. But how about my pure python files?
Do I call Python from CMake or rather CMake from Python, or is it possible to stay in CMake entirely?
The second link (it's the example linked in the documentation) unfortunately only builds the extension, but unfortunately does not distribute any other Python files with it.

How about my users? How would they like to install my module?
On Ubuntu, standard way would be to install a .deb package for my C++ SDK, and then use pip or setup.py for the python part. On Windows? SDK installer and then build the extensions for a specific Python version? Deliver prebuild extensions and register them with existing Python installations?

As I said, this might be (and probably is) beyond the scope of this project, but some additional pointers in the documentation would be very helpful.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.