Build helpers and PEP 517 backend for IVPM-managed Python extension projects
Project description
ivpm-build
Build tooling for Python packages that wrap native C/C++ extensions, with IVPM integration for cross-package dependency resolution.
ivpm-build handles the full native-extension build pipeline:
- CMake build — configure, build, and install native code via
CmakeBuilder - Python extension compile — Cython/C++ extension compilation via a
BuildExtcommand that injects include and library paths from IVPM-managed dependencies - Shared-library packaging —
InstallLibcopies native.so/.dll/.dylibfiles into the wheel alongside the Python extension module - IVPM dependency resolution — queries the IVPM package registry
(
PkgInfoRgy) to obtain include dirs, library dirs, and Cython.pxdfiles from other IVPM-managed native packages listed inivpm.yaml
When to use ivpm-build
Use ivpm-build when your Python package:
- wraps a C/C++ library built with CMake, and/or
- exposes a Cython extension that links against native libraries from other
IVPM-managed packages (e.g.
debug-mgr,ciostream,antlr4-runtime)
Installation
pip install ivpm-build
Quick Start
pyproject.toml (recommended)
[build-system]
requires = ["setuptools>=64", "wheel", "cython", "ivpm-build", "ivpm"]
build-backend = "setuptools.build_meta"
setup.py
from ivpm_build.setup import setup # replaces ivpm.setup.setup
from setuptools import Extension
ext = Extension("mypkg._core", sources=["python/core.pyx"], language="c++")
setup(
name="mypkg",
ext_modules=[ext],
ivpm_extdep_pkgs=["debug-mgr", "ciostream"], # IVPM deps → include/lib paths
ivpm_extra_data={
"mypkg": [
("build/{libdir}/{libpref}mypkg{dllext}", ""), # bundle native lib
]
},
)
BuildExt (injected by setup()) automatically resolves include directories,
library directories, and Cython .pxd search paths from each package listed in
ivpm_extdep_pkgs via the IVPM registry.
CMake-only build
from ivpm_build.cmake import CmakeBuilder
builder = CmakeBuilder(proj_dir="/path/to/project")
builder.run() # cmake configure → build → install
Integration paths
| Path | When to use |
|---|---|
Path 1 — swap from ivpm.setup import setup → from ivpm_build.setup import setup |
Existing setup.py project, zero-change migration |
Path 2 — apply_ivpm_setup() in setup.py + pyproject.toml metadata |
Fine-grained control over extension descriptors |
Path 3 — pure pyproject.toml with build-backend = "ivpm_build.backend" |
New projects or full modernisation |
See the migration guide for step-by-step instructions.
Documentation
Full documentation: https://fvutils.github.io/ivpm-build
License
Apache 2.0 — see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ivpm_build-0.2.0.27908268978.tar.gz.
File metadata
- Download URL: ivpm_build-0.2.0.27908268978.tar.gz
- Upload date:
- Size: 26.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cd7f640875e36cc677393999debd90cfa6698b3f5ead12d1b86730d5c597ea5
|
|
| MD5 |
3ebda9e5a9fb285eb2f994f0766dadd0
|
|
| BLAKE2b-256 |
6fa86b711ec5d7740254d7a94d90dbbbbe691164f94583c643fc5092ad91f417
|
File details
Details for the file ivpm_build-0.2.0.27908268978-py3-none-any.whl.
File metadata
- Download URL: ivpm_build-0.2.0.27908268978-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
208edc10d9dfda8ae216959ad436744d23cee3a46ca592b3871fa23cb165c56e
|
|
| MD5 |
bf07ff185837e86030d9ca0b48a25b7c
|
|
| BLAKE2b-256 |
cf42742857d2d06939c50995eda0d20fea68077a731e93fd858093501a187ed3
|