Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.46 KB

File metadata and controls

38 lines (26 loc) · 1.46 KB

CPPython

A transparent Python management solution for C++ dependencies and building.

CPPython lets you declare C++ dependencies in pyproject.toml and have them resolved, installed, and wired into your build system automatically. It works two ways:

  • As a PEP 517 build backend: declare cppython.build in [build-system] and CPPython installs C++ dependencies before delegating to scikit-build-core or meson-python. See Build Backend.
  • As a CLI: run cppython install, cppython build, and related commands directly against a CMake or Meson project, without a Python packaging step.

Plugin architecture

CPPython resolves dependencies and generates build configuration through three kinds of plugins:

Kind Purpose Built-in plugins
Provider Installs and publishes C++ dependencies Conan, vcpkg
Generator Produces build-tool configuration (presets, native files) CMake, Meson
SCM Detects project version from source control Git

Quick start

[build-system]
requires = ["cppython[conan, cmake]"]
build-backend = "cppython.build"

[tool.cppython]
dependencies = ["fmt>=11.0.0"]

[tool.cppython.providers.conan]
[tool.cppython.generators.cmake]
pip wheel .

See Build Backend for the full workflow, or Configuration for every available option.