Zig-powered build backend and CLI for Python extension modules
Project description
alloconda CLI
Alloconda ships a small CLI for building and packaging Zig-based Python extensions.
It also provides a PEP 517 build backend for pyproject.toml projects.
Commands
alloconda build
Build the extension via zig build, detect the PyInit_* symbol, and copy the
compiled library into the Python package directory.
alloconda build
Options:
--release: use-Doptimize=ReleaseFast--module: override thePyInit_*module name--lib: path to a prebuilt library--package-dir: where to install the extension--ext-suffix: override the extension suffix (useful for cross builds)--zig-target: Zig target triple for cross builds--python-include: cross-build Python include path--no-init/--force-init: control__init__.pygeneration
alloconda wheel
Build a wheel by staging the package, copying the compiled extension, and writing
dist-info metadata. This is intentionally lightweight and targets the common
PEP 427 path.
alloconda wheel --python-tag cp312 --abi-tag cp312 --manylinux 2_28 --arch x86_64
Options:
- Tag selection:
--python-tag,--abi-tag,--platform-tag - Manylinux/musllinux helpers:
--manylinux,--musllinux,--arch --python-version/--pbs-target: use cached python-build-standalone headers--ext-suffix: override the extension suffix for cross builds--out-dir: wheel output directory (default:dist/)--skip-build: skipzig buildif you already built the library
When using --python-version, run alloconda python fetch first to populate the cache.
If --python-tag is omitted, it defaults from --python-version (e.g. cp314).
alloconda wheel-all
Build a full wheel matrix across common platforms and Python versions.
alloconda wheel-all --python-version 3.14 --include-musllinux
Options:
--python-version(repeatable) or--allfor every available version--targetto override the default platform list--include-windowsto add Windows targets (experimental)--fetchto auto-download missing headers--dry-runto print the matrix
alloconda develop
Build and install the project in editable mode via pip install -e . (or uv pip).
alloconda develop
Options:
--release: use-Doptimize=ReleaseFast--module: override thePyInit_*module name--lib: path to a prebuilt library--package-dir: where to install the extension--ext-suffix: override the extension suffix--zig-target: Zig target triple for cross builds--python-include: cross-build Python include path--skip-build: skip the zig build step (requires existing output)--no-init/--force-init: control__init__.pygeneration--pip-arg: extra args passed through to pip (repeatable)--uv: useuv pip(auto-selected if pip is missing)
alloconda init
Scaffold a Zig project for an alloconda Python extension module.
alloconda init --alloconda-path ../../
Options:
--nameto override the project name--module-nameto override the Python extension module name--dirto choose a target directory--alloconda-pathto point at a local alloconda checkout--forceto overwrite existing files
alloconda inspect
Inspect a built library or wheel and print derived metadata. Useful for quick sanity checks in scripts.
alloconda inspect --lib zig-out/lib/libzigadd.dylib
alloconda inspect --wheel dist/zigadd-0.1.0-*.whl --verify
alloconda python fetch
Fetch and cache python-build-standalone headers for cross builds.
alloconda python fetch --version 3.14 --manylinux 2_28 --arch x86_64
The cache location can be overridden with ALLOCONDA_PBS_CACHE or --cache-dir.
Build backend
Add this to pyproject.toml to use alloconda as a build backend:
[build-system]
requires = ["alloconda"]
build-backend = "alloconda.build_backend"
Configuration
Alloconda reads optional defaults from pyproject.toml:
[tool.alloconda]
module-name = "_zigadd"
package-dir = "zigadd"
python-version = "3.14"
python-tag = "cp314"
abi-tag = "cp314"
manylinux = "2_28"
arch = "x86_64"
include = ["*.pyi"]
exclude = ["tests/*"]
CLI flags and PEP 517 --config-settings override these values.
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 alloconda-0.0.1a1.tar.gz.
File metadata
- Download URL: alloconda-0.0.1a1.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4006cd5e79aa0c1540a87464acfed741e93be3c5aa8da23e06ab247f25a85f34
|
|
| MD5 |
b8765564e3aa74157b9721505b933be6
|
|
| BLAKE2b-256 |
ab0ae809e59228e2cf607eb457de2892fb09d98f30ba132859b08dc04b8b5175
|
File details
Details for the file alloconda-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: alloconda-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2cc3258239079e6b89f75b6cce023658639227d350e125d92cf27ef2251f061
|
|
| MD5 |
e84419e308ade684230042ef03b41bc7
|
|
| BLAKE2b-256 |
2a64576cb000f89ef62b49f26f4aa0e8e36fc66493a44a819c4016f8834ef829
|