Skip to main content

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:

  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 packagingInstallLib 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

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 setupfrom ivpm_build.setup import setup Existing setup.py project, zero-change migration
Path 2apply_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


Download files

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

Source Distribution

ivpm_build-0.2.0.27884918630.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ivpm_build-0.2.0.27884918630-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file ivpm_build-0.2.0.27884918630.tar.gz.

File metadata

  • Download URL: ivpm_build-0.2.0.27884918630.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ivpm_build-0.2.0.27884918630.tar.gz
Algorithm Hash digest
SHA256 30e76e750f009aaad1a6d78ae7e9d97fd2cbdb8d6cc54901f5b2aee7e7bd45c5
MD5 fc48635d9035fb1dbe8b63d0b3c49b81
BLAKE2b-256 cdfab5cd7697d374816c0d424b1b12d5aa3427e73a671cea7597cd9d30d517f9

See more details on using hashes here.

File details

Details for the file ivpm_build-0.2.0.27884918630-py3-none-any.whl.

File metadata

File hashes

Hashes for ivpm_build-0.2.0.27884918630-py3-none-any.whl
Algorithm Hash digest
SHA256 85a5915d3680b5009ea1fc1f0540731d6c94c4af9369c1305e244f29ab23c2c8
MD5 48a04f87ab65e92c085ddf7134fd9836
BLAKE2b-256 74007804b4e2071736e76b0cd4d87cba370ea11d560ab94df264042decf39e95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page