Skip to main content

setuptools-pybind11

Setuptools extension for building pybind11 libraries with CMake

Usage

Add setuptools-pybind11 to your pyproject.toml

[build-system]
requires = [
    "setuptools", 
    "wheel", 
    # Use setuptools-pybind11 if you don't want to automatically install cmake
    "setuptools-pybind11[cmake]"
    ]
# set this package as the backend
build-backend="setuptools_pybind11"

[project]
name = "example"
version = "0.1.0"
... # other project stuff

# you can define multiple modules
[tool.setuptools-pybind11.modules.example]
# defaults to this
source_dir = "."
# prefix in build directory to main binary
bin_prefix = ""
# binary dir prefixes for dependencies
dep_bin_prefixes = ["example-dep"]
# include/data directories and their name (placed under [package-name]-[version].inc/path)
inc_dirs = [["example-dep", "example-path"]]
# any additional cmake configs you need
cmake_config_options = ["-DMYCMAKE_OPTION=ON"]
cmake_build_options = ["--MyBuildOption"]

Build your module python -m build

Metadata

Release files for setuptools-pybind11 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for setuptools-pybind11 0.4.0
File Interpreter ABI Platform
setuptools_pybind11-0.4.0-py3-none-any.whl Python 3 none any Details

Release files / setuptools_pybind11-0.4.0-py3-none-any.whl

Download URL setuptools_pybind11-0.4.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54a8d83f938906db0a5ae77f9082381b206b0a21bcc46e7ff7ee606b0c1c790a
BLAKE2b-256 checksum
How to use checksums
6d04ffd4af7b6a5552936adff04e03905477947659a5172410fd071b6ed67b56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.4.0 This release

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page