Skip to main content

Setuptools extension for building pybind11 libraries with CMake

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

setuptools_pybind11-0.4.0-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page