livery.extensions.nanobind._build¶
livery.extensions.nanobind._build ¶
Build a nanobind package's platform wheels and its sdist.
The build phase's step for a package whose set holds nanobind:
cibuildwheel builds and repairs each wheel, so even one host's wheel is
manylinux-compliant, and uv build writes the sdist. The release
train runs the step on the build phase's isolated side. nanobind's
declaration deletes python's build step in the same set, since
uv build would write a pure wheel. The floor legs build a second
set of wheels through build_wheels, which leaves the collected
dist/ alone; the conan environment each build takes is the
_container module's.
Functions:
| Name | Description |
|---|---|
build |
Build the package's platform wheels and its sdist, at the engine's epoch. |
build_dist |
Build the platform wheels through cibuildwheel, and the sdist; the |
conan_install_args |
What the package's |
assert_platform_tagged |
Refuse any pure-tagged wheel in dist; the identity guard. |
host_is_musl |
Whether this interpreter's C library is musl. |
build_wheels |
Build this package's wheels into dist; the environment used. |
Attributes:
| Name | Type | Description |
|---|---|---|
CIBUILDWHEEL |
|
|
DEFAULT_INSTALL_ARGS |
|
build ¶
build(ctx: PhaseContext) -> None
Build the package's platform wheels and its sdist, at the engine's epoch.
Source code in packages/extensions/nanobind/src/livery/extensions/nanobind/_build.py
build_dist ¶
Build the platform wheels through cibuildwheel, and the sdist; the dist/.
Locally the run pins to the running interpreter
(CIBW_BUILD, respected when the caller already set it), so
the build stays minutes; the release matrix widens the set in
CI. Always from a clean dist/, like python's build.
Raises:
| Type | Description |
|---|---|
Failed
|
when cibuildwheel or |
Source code in packages/extensions/nanobind/src/livery/extensions/nanobind/_build.py
conan_install_args ¶
What the package's pyproject.toml passes to conan install.
Reads [tool.scikit-build.cmake.define] CONAN_INSTALL_ARGS,
the package's own declaration, in either spelling: a plain
string, or the table whose default the environment
overrides. The floor leg starts from this and adds its pin, so
the two builds differ by the pin alone.
Source code in packages/extensions/nanobind/src/livery/extensions/nanobind/_build.py
assert_platform_tagged ¶
Refuse any pure-tagged wheel in dist; the identity guard.
A nanobind package's wheel that says none-any was built
without its extension module, and publishing it would hand every
consumer an ImportError. The other half of the guard, a platform
tag on a pure package's wheel, is python's build's.
Source code in packages/extensions/nanobind/src/livery/extensions/nanobind/_build.py
host_is_musl ¶
host_is_musl() -> bool
Whether this interpreter's C library is musl.
Decides which linux wheel flavour the host can install: a musl-based interpreter (an Alpine runner's uv-managed python) takes the musllinux wheel, a glibc one the manylinux wheel. Read from the interpreter's build triple, with the loader the platform ships as the second signal, so a python built against musl on a glibc host still answers for itself.
Source code in packages/extensions/nanobind/src/livery/extensions/nanobind/_build.py
build_wheels ¶
build_wheels(package: Package, root: Path, dist: Path, *, epoch: int = 0, conan_install_args: str = '', one_host_wheel: bool = False) -> dict[str, str]
Build this package's wheels into dist; the environment used.
The wheel half of build_dist, split out so a leg can build a
second set somewhere else without touching the collected
dist/. conan_install_args replaces what the package's own
pyproject.toml passes to conan, which is how the floor leg adds
the profile that pins the library it links. one_host_wheel
builds one wheel for this machine alone, whatever set the matrix
put in the environment: a proof about the library's C++ interface
needs one interpreter, not the whole matrix.
Raises:
| Type | Description |
|---|---|
Failed
|
when cibuildwheel exits non-zero, or the wheels it wrote carry no platform tag. |