Warning
This is experimental proof-of-concept code. Do NOT use it for anything serious or in production environments.
A utility for creating portable archives of pixi environments with vendored PyPI dependencies.
This tool addresses a gap in the current pixi ecosystem by allowing you to create self-contained ZIP archives that include non-public PyPI dependencies (VCS dependencies, path dependencies, and private packages). This is useful when you need to share or deploy pixi environments that contain dependencies not available on public PyPI.
Note: This is a temporary solution until official vendoring support is added to pixi itself.
- Extracts non-public PyPI dependencies from
pixi.lockfiles - Downloads or builds source distributions for these dependencies
- Creates a ZIP archive containing the vendored dependencies alongside updated
pixi.tomlandpixi.lockfiles - Updates dependency paths to point to the vendored artifacts
git clone https://github.com/jorenretel/pixi-vendor-proof-of-concept.git
cd pixi-vendor-proof-of-concept
pip install -e .# Create a vendored archive from the current directory
pixi-vendor create
# Specify custom paths
pixi-vendor create --lock path/to/pixi.lock --manifest path/to/pixi.toml --output my-env.zip
# Dry run to see what would be done
pixi-vendor create --dry-run
# Force rebuild even if archive exists
pixi-vendor create --forcefrom pixi_vendor import create
# Create vendored archive
archive_path = create(
lock_path="pixi.lock",
toml_path="pixi.toml", # Optional, inferred if not provided
output_path="my-env.zip", # Optional, defaults to workspace-name-slim.zip
dry_run=False
)-
Create the archive:
cd my-pixi-project pixi-vendor create -
Extract and use elsewhere:
unzip my-project-slim.zip -d /path/to/deployment cd /path/to/deployment pixi install
- VCS dependencies: Git repositories, GitHub, GitLab, etc.
- Path dependencies: Local packages with
path = "..." - Direct URL dependencies: Private package servers
Regular PyPI packages are left as-is since they're publicly available.
- Python 3.11+
- pixi project with
pixi.lockfile - Dependencies: pydantic
- Only handles PyPI dependencies (conda dependencies are not vendored)
- Requires source distributions to be buildable
- May need build tools installed (
pip install buildif auto-install fails)
# Run tests
pixi run pytest
# Install in development mode
pip install -e .Internal use only.