Skip to content

Support standalone native libraries (no Python extension) - #1

Merged
mballance merged 1 commit into
mainfrom
feat/standalone-native-lib-support
Jun 20, 2026
Merged

mballance merged 1 commit into
mainfrom
feat/standalone-native-lib-support

Conversation

@mballance

Copy link
Copy Markdown
Member

Enable the pyproject backend path to build and package a standalone shared library (loaded via ctypes) for projects that have no Python extension module.

  • B1: build_wheel now stages [tool.ivpm-build] extra-data artifacts into the package source dir before delegating to setuptools (and cleans them up after), so the native lib/headers land in the wheel. Previously InstallLib was only wired in the setup.py path, so the backend compiled the lib but never bundled it.
  • B2: build_editable now runs the CMake cycle when cmake=true (mirrors build_wheel); get_requires_for_build_editable adds ninja accordingly. Makes pip install -e . build the native lib.
  • B3: add python -m ivpm_build build [--debug] CLI -- the in-place dev-rebuild equivalent of setup.py build_ext --inplace for the no-extension case.

Adds tests for staging (file + dir + missing-src), package-dir resolution, editable CMake invocation, and the CLI. Full suite: 58 passed.

Enable the pyproject backend path to build and package a standalone shared
library (loaded via ctypes) for projects that have no Python extension module.

- B1: build_wheel now stages [tool.ivpm-build] extra-data artifacts into the
  package source dir before delegating to setuptools (and cleans them up after),
  so the native lib/headers land in the wheel. Previously InstallLib was only
  wired in the setup.py path, so the backend compiled the lib but never bundled
  it.
- B2: build_editable now runs the CMake cycle when cmake=true (mirrors
  build_wheel); get_requires_for_build_editable adds ninja accordingly. Makes
  `pip install -e .` build the native lib.
- B3: add `python -m ivpm_build build [--debug]` CLI -- the in-place dev-rebuild
  equivalent of `setup.py build_ext --inplace` for the no-extension case.

Adds tests for staging (file + dir + missing-src), package-dir resolution,
editable CMake invocation, and the CLI. Full suite: 58 passed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mballance
mballance merged commit 9e79d1c into main Jun 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant