bin2whl
Build Python wheels from pre-compiled binaries. Takes any pre-compiled binary (Go, Zig, C, Rust, etc.) and packages it as a platform-specific Python wheel for distribution on PyPI. One wheel per binary, per platform.
Features
- Zero dependencies (pure Python, standard library only)
- Multi-binary support — include multiple binaries per wheel (e.g. server + client)
- Config file support (
--config wheel.json) for repeatable builds - Single binary mode for one-off builds
- Platform aliases for cleaner config (e.g.
linux_arm64instead ofmanylinux_2_17_aarch64) - Binaries land directly in venv's bin/ — no Python wrapper
- Supports macOS, Linux, and Windows on x86_64 and ARM64
- Proper wheel metadata and SHA256 hashes (PEP 427)
- Optional PyPI classifiers
- Works with
pip installanduv tool install
Installation
# Using uv
uv pip install bin2whl
# Using pip
pip install bin2whl
Usage
Config file mode
Create a wheel.json. For a single binary per platform:
{
"name": "your-go-tool",
"version": "0.1.0",
"description": "A Go CLI tool packaged for PyPI",
"author": "Your Name",
"binaries": {
"linux_x86_64": "dist/tool-linux-x86_64",
"linux_arm64": "dist/tool-linux-arm64",
"macos_arm64": "dist/tool-macos-arm64",
"windows_amd64": "dist/tool-win-x86_64.exe"
}
}
For multiple binaries per platform (e.g. server + client):
{
"name": "your-suite",
"version": "0.1.0",
"binaries": {
"linux_x86_64": [
{"name": "your-server", "path": "dist/server-linux-x86_64"},
{"name": "your-client", "path": "dist/client-linux-x86_64"}
],
"macos_arm64": [
{"name": "your-server", "path": "dist/server-darwin-arm64"},
{"name": "your-client", "path": "dist/client-darwin-arm64"}
]
}
}
Then build:
bin2whl --config wheel.json
Single binary mode
bin2whl \
--name your-go-tool \
--version-str 0.1.0 \
--binary dist/tool-linux-x86_64 \
--platform linux_x86_64
Output
Each binary produces one wheel:
wheels/
├── your_go_tool-0.1.0-py3-none-manylinux_2_17_x86_64.whl
├── your_go_tool-0.1.0-py3-none-manylinux_2_17_aarch64.whl
├── your_go_tool-0.1.0-py3-none-macosx_10_9_x86_64.whl
├── your_go_tool-0.1.0-py3-none-macosx_11_0_arm64.whl
├── your_go_tool-0.1.0-py3-none-win_amd64.whl
└── your_go_tool-0.1.0-py3-none-win_arm64.whl
Upload to PyPI, then users just run:
pip install your-go-tool
your-go-tool --help
Development
# Set up development environment
make dev
# Run linting and type checks
make check
# Format code
make format
# Build wheel and docs
make build
Publishing
Publishing requires wj-publish configuration.
# Build first
make build
# Publish wheel to PyPI and docs to docs.waterjuice.org
make publish
Licence
Unlicense — public domain. See LICENSE.
Metadata
Release files for bin2whl 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bin2whl-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for bin2whl-1.0.2-py3-none-any.whl |
Release files / bin2whl-1.0.2-py3-none-any.whl
| Download URL | bin2whl-1.0.2-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ec28a77cdf19ecaac9ca3ad28a869b4e6c68a765ac88e3694ff0fd2b5f01c93
|
|
BLAKE2b-256 checksum How to use checksums |
eac1e849f651621325afcb8cf00856c9a3451d1a1fef1960868d129aec36943a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for bin2whl 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.