Skip to main content

Modern, PEP 517 compliant build backend for building Python packages with

Project description

Python Wheel

py-build-cmake

Modern, PEP 517 compliant build backend for building Python packages with extensions built using CMake.

Features

  • Build C, C++ or Fortran extensions for Python using CMake
  • Declarative configuration using pyproject.toml (PEP 621), compatible with flit
  • Editable/development installations for Python modules (PEP 660)
  • Compatible with pybind11
  • Generate stubs for type checking and suggestions
  • Customizable CMake configuration, build and installation options
  • Support for multiple installation configurations and components
  • Platform-specific CMake options
  • Cross-compilation support
  • No dependency on setuptools

Planned features

  • Entry point support
  • Namespace package support (PEP 420)
  • Doxygen and Sphinx support
  • OSX support

Installation

The py-build-cmake package is available on PyPI:

pip install py-build-cmake

Usage

Add a pyproject.toml configuration file (see examples/minimal for detailed instructions), and use pip, build or another PEP 517 compatible frontend to install and/or build the package.

Build sdist and wheel packages you can upload to PyPI:

python -m build . # find the sdist and wheel file in the 'dist' folder

Install the package in the current environment:

pip install . # normal installation
pip install -e . # editable installation

Examples

For example usage, see the examples/minimal and examples/pybind11-project example projects.

Documentation

The documentation can be found on https://tttapa.github.io/py-build-cmake.

The format of the configuration file is explained in Config.md.

Alternatively, use the following command to get the documentation for all supported options:

python -m py_build_cmake.help

Project details


Download files

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

Source Distribution

py-build-cmake-0.0.2b0.tar.gz (18.3 kB view hashes)

Uploaded Source

Built Distributions

py_build_cmake-0.0.2b0-py310-none-any.whl (19.9 kB view hashes)

Uploaded Python 3.10

py_build_cmake-0.0.2b0-py39-none-any.whl (19.9 kB view hashes)

Uploaded Python 3.9

py_build_cmake-0.0.2b0-py38-none-any.whl (19.9 kB view hashes)

Uploaded Python 3.8

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