ZuZhuang -- Assemble Portable Python Environments
ZuZhuang (组装) assembles portable, self-contained Python environments for any operating system. Download a Python release, install your packages, unpack, set a few environment variables, and you're ready to go.
Features
- Cross-platform: build portable Python for Windows, macOS, and Linux
- Self-contained: the output directory is fully portable - copy it to a USB drive, network share, or another machine
- Package installation: automatically install pip and any packages you need
- Activation scripts: generates
activate.bat(Windows) andactivate.sh(macOS/Linux) for one-command setup - Python versions: lists all available versions from python.org
Requirements
- Python 3.9+
- git, make, gcc, and libssl-dev (Linux builds only)
Installation
pip install zuzhuang
Quick Start
# List available Python versions
zuzhuang list-python
# Build a portable Python 3.12.6 environment with numpy and pandas
zuzhuang build 3.12.6 --packages numpy,pandas -o ./my-python
# Activate the environment
# Windows: my-python\activate.bat
# macOS/Linux: source my-python/activate.sh
# Run Python
python -c "import numpy; print(numpy.__version__)"
Usage
CLI
zuzhuang build <version> -o <output_dir> [options]
zuzhuang list-python [options]
Build Options
| Flag | Description |
|---|---|
-o, --output |
Output directory (required) |
-p, --packages |
Comma-separated pip packages |
--target |
Target OS: windows, macos, or linux (auto-detect) |
--force |
Overwrite existing output directory |
--json |
Output as JSON |
-v, --verbose |
Verbose output |
Python API
from zuzhuang import zuzhuang_build, zuzhuang_list_python
# List available versions
result = zuzhuang_list_python(target_os="windows")
print(result.data["versions"])
# Build a portable environment
result = zuzhuang_build(
python_version="3.12.6",
packages=["numpy", "pandas"],
output_dir="./my-python",
)
print(result.success)
Development
pip install -e ".[dev]"
pytest
ruff check .
ruff format .
License
GPL-3.0
Metadata
Release files for zuzhuang 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| zuzhuang-0.1.0.tar.gz | 22.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zuzhuang-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.8 kB
Release files / zuzhuang-0.1.0.tar.gz
| Download URL | zuzhuang-0.1.0.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
282712d35dc25b766c7c70182847a2223cd57a02be63b1338081e96dbdb172e9
|
|
BLAKE2b-256 checksum How to use checksums |
fab31b4797554c0af0bf6ae3e8a1445ff5f63e0dd28cfab65df478f7676baff3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / zuzhuang-0.1.0-py3-none-any.whl
| Download URL | zuzhuang-0.1.0-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
666002c2e2ede313a85bf9104316b49d88b945f1161498c0c8d64f64db2c0c93
|
|
BLAKE2b-256 checksum How to use checksums |
df6862908e3759a8ae15a2591ecc2e634621dcd072e530dfbeec5373a1ecc5b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for zuzhuang 0.1.0
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.