Skip to main content

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:

  1. CMake build — configure, build, and install native code via CmakeBuilder
  2. Python extension compile — Cython/C++ extension compilation via a BuildExt command that injects include and library paths from IVPM-managed dependencies
  3. Shared-library packaging — InstallLib copies native .so/.dll/.dylib files into the wheel alongside the Python extension module
  4. IVPM dependency resolution — queries the IVPM package registry (PkgInfoRgy) to obtain include dirs, library dirs, and Cython .pxd files from other IVPM-managed native packages listed in ivpm.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

[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

Metadata

Release files for ivpm-build 0.2.1.37232149860

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ivpm-build 0.2.1.37232149860
File Size Uploaded
ivpm_build-0.2.1.37232149860.tar.gz 28.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ivpm-build 0.2.1.37232149860
File Interpreter ABI Platform
ivpm_build-0.2.1.37232149860-py3-none-any.whl Python 3 none any Details

Total release size: 54.8 kB

Release files / ivpm_build-0.2.1.37232149860.tar.gz

Download URL ivpm_build-0.2.1.37232149860.tar.gz
Size 28.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0b11da080b840ec1793885a26f8e3ae528afb68afb26e812b44b5ecfcc3a1dd0
BLAKE2b-256 checksum
How to use checksums
fd5e72579beeea4dd4856cbaeb4aa3b8502dd1d6af0e114d15c2051bb8bb78ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / ivpm_build-0.2.1.37232149860-py3-none-any.whl

Download URL ivpm_build-0.2.1.37232149860-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f180dd777d4f4f2cd8fed8d428291cec999a2eb346ed9d0c279ff8bd9181c761
BLAKE2b-256 checksum
How to use checksums
ab09093534c68b5bd2d5ca22c799cef477ead4f2fea8be704ee6ca99464a4f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.2.1.37232149860 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page