module.def("add", add, ...)ndarray abstractions
pybind11 or nanobind manage lifetimes for bindings
pyproject.toml
pip install .
pyproject.tomlpyproject.toml
setuptools
setup.py, setup.cfg
pyproject.toml
src/ext/add_module.cpp
CMakeLists.txt
src/py_build_cmake_example_project/__init__.py
src/py_build_cmake_example_project/sub_package/__init__.py
src/py_build_cmake_example_project/sub_package/sub.py
python -m build --wheel
python -m build --sdist
pip install .pip install -e .py-build-cmake actually do?
pyproject.toml to
determine how to build and package the project
cibuildwheel (github.com/pypa/cibuildwheel)
CMakeLists.txt
cibuildwheel pre-build
hook → prefer installation from
source → prefer automated
installation → prefer a package manager with lock filespy-build-cmake
pyproject.toml
conanfile.txt
py-build-cmake package simplifies the packaging
processpy-build-cmake example projects:
@tttapa on
GitHub