Skip to main content

Conda plugin entry point for the conda-ship runtime builder.

Project description

conda-ship

CI Docs zizmor License Python: 3.10+

Build ready-to-run conda runtimes from solved conda environments.

conda-ship is a generic builder for single-binary conda runtimes. It provides the cs builder CLI, the cs-template generic runtime template, a composite GitHub Action, and an optional Python adapter that exposes conda ship inside conda.

The project is currently alpha and pre-1.0. The split from conda-express is now explicit: conda-ship owns the reusable build/runtime machinery, while downstream distributions own their package sets, runtime names, release channels, installer wrappers, and user documentation. conda-express is one downstream distribution maintained by Jannis Leidel; it uses conda-ship to publish the cx and cxz runtimes.

Quickstart

This shortest path uses conda-workspaces to create a solved source environment, then builds an online runtime named demo:

conda install --name base -c conda-forge conda-pypi
conda create -n cs-demo -c conda-forge python pip conda-workspaces
conda activate cs-demo
conda pypi install conda-ship

mkdir demo-runtime
cd demo-runtime
conda workspace init --format conda --name demo-runtime
conda workspace add --feature ship --no-lockfile-update \
  "python>=3.12" \
  "conda>=25.1" \
  conda-rattler-solver \
  "conda-spawn>=0.1.0"
cat >> conda.toml <<'TOML'

[tool.conda-ship]
runtime-name = "demo"
runtime-version = "0.1.0"
delegate-executable = "conda"
artifact-layout = "online"
source-environment = "ship"
exclude-packages = ["conda-libmamba-solver"]
TOML

conda workspace lock
cs inspect
cs build --dry-run
cs build
./dist/demo info

For a guided walkthrough with automatic first-run bootstrap and embedded runtime examples, see the first runtime tutorial.

What It Builds

conda-ship stages a runtime binary plus release metadata:

  • .runtime.lock: the lockfile stamped into the runtime
  • .packages.txt: tab-separated package records for quick inspection
  • .info.json: artifact metadata for release tooling
  • .sha256: checksums for staged files
  • optional .bundle.tar.zst: compressed package archives for offline builds

On first invocation, the runtime automatically bootstraps its managed prefix. It then passes every argument to the configured delegate executable, usually conda. The delegate and its plugins handle --help, --version, and every subcommand. conda-ship does not reserve those arguments.

During bootstrap, generated runtimes also write constructor-compatible conda prefix metadata. The managed prefix gets conda-meta/history and conda-meta/initial-state.explicit.txt in addition to conda-ship's ownership metadata. Conda can recognize the prefix as an environment, and runtimes that include conda-self can use that initial-state snapshot for conda self reset --snapshot installer-updated or conda self reset --snapshot installer-exact.

Artifact Layouts

Layout Output Bootstrap behavior
online <runtime-name> or <artifact-name> Downloads packages from the stamped runtime lock.
external <runtime-name> or <artifact-name> plus <name>.bundle.tar.zst Uses a separate package bundle for offline-capable installs.
embedded <runtime-name> or <artifact-name> Embeds the compressed package bundle in one binary.

Project Input

conda-ship builds from an already solved source environment. It does not solve loose matchspecs in the GitHub Action and it does not define a package set of its own.

Supported manifest and lockfile pairs:

  • conda.toml plus conda.lock
  • pyproject.toml with [tool.conda] plus conda.lock
  • pixi.toml plus pixi.lock
  • pyproject.toml with [tool.pixi] plus pixi.lock

The package and channel intent lives in the selected source environment. [tool.conda-ship] only records conda-ship build policy:

[tool.conda-ship]
runtime-name = "demo"
runtime-version = "0.1.0"
delegate-executable = "conda"
artifact-layout = "online"
source-environment = "ship"
exclude-packages = ["conda-libmamba-solver"]

The selected source environment defines the complete package set. It must include the configured delegate executable and any optional commands the distribution exposes. A conda distribution can include conda, conda-rattler-solver, and conda-spawn, while a runtime with another delegate can omit them. Include conda-self when a conda runtime should expose conda self reset for restoring the bootstrapped base prefix to the initial package set shipped by the runtime.

conda-ship does not choose conda configuration. Set condarc-file to copy a YAML condarc file to <prefix>/.condarc, and set freeze-base = true when it should write a CEP 22 frozen marker. Both are disabled by default.

Local Workflow

Packaged builds find cs-template next to the installed cs executable. Use --template only for an explicit template path, custom packaging, or cross-builds.

cs inspect
cs build --dry-run
cs build
cs build --artifact-layout embedded
cs run --install-path /tmp/demo-smoke -- info

cs inspect is the preflight command. It derives the runtime lock, validates the selected source environment, applies package exclusions, and prints the package set without writing artifacts.

Inspect a source environment before shipping it

Use cs build --dry-run to preview the runtime metadata and staged release asset paths before writing files.

Preview conda-ship runtime artifacts

After a real build, verify the staged artifacts and inspect the release metadata before handing them to downstream packaging or signing.

Verify staged conda-ship artifacts

The staged runtime is a stamped copy of the generic runtime template. It bootstraps the managed prefix if needed, then runs the configured delegate.

GitHub Actions

The repository root is also a composite GitHub Action for downstream release jobs:

- uses: jezdez/conda-ship@FULL_RELEASE_COMMIT_SHA # X.Y.Z
  id: cs
  with:
    conda-ship-version: "X.Y.Z"
    artifact-layout: embedded

The action expects a committed manifest and matching lockfile. It downloads the configured cs, cs-template, and SHA256SUMS release assets for the runner, verifies their GitHub Artifact Attestations, checks the release checksums, runs cs build --dry-run, and then stages the runtime into a dist-path output.

Pin the action source to a full release commit SHA for release builds and pass the matching conda-ship release through conda-ship-version. When the action is invoked by an exact release tag, conda-ship-version can be omitted for backwards compatibility.

Packaging

conda-ship is not an OS installer generator. It does not target .sh, .pkg, or .msi output directly. It produces runtimes that can be distributed as GitHub Release assets or wrapped by Homebrew, constructor, Docker, enterprise packaging systems, and other release tooling.

The PyPI package installs the cs builder, the cs-template runtime template, and the Python adapter together. The adapter makes conda ship a shortcut for the same builder when installed in a conda environment; it does not make conda-ship part of conda itself. A future conda package should install the same pieces into one environment.

What Belongs Downstream

Downstream distributions decide:

  • runtime names and delegates
  • package sets and channels
  • package exclusions
  • install schemes and install names
  • documentation URLs
  • release channels and installers
  • signing, SBOM, and in-toto provenance for final artifacts

conda-ship verifies the inputs it consumes and the package archives it stages or installs, but downstream release systems should sign and attest the final runtime artifacts after cs build.

Documentation

Full documentation is available at jezdez.github.io/conda-ship.

Useful starting points:

Development

pixi install
pixi run test
pixi run lint
pixi run -e test pytest
pixi run docs

pixi run lint runs the repository's prek hooks, including Rust formatting and clippy checks.

The terminal demos are generated from demos/*.tape with VHS:

pixi run demos
pixi run demos inspect

The tapes build local debug cs and cs-template binaries in hidden setup so the visible commands match the packaged workflow.

Run cargo generate-lockfile after changing Cargo metadata and pixi lock after changing pixi metadata.

License

BSD-3-Clause

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conda_ship-0.5.0.tar.gz (108.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

conda_ship-0.5.0-py3-none-win_arm64.whl (6.8 MB view details)

Uploaded Python 3Windows ARM64

conda_ship-0.5.0-py3-none-win_amd64.whl (7.1 MB view details)

Uploaded Python 3Windows x86-64

conda_ship-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

conda_ship-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

conda_ship-0.5.0-py3-none-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

conda_ship-0.5.0-py3-none-macosx_10_12_x86_64.whl (6.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file conda_ship-0.5.0.tar.gz.

File metadata

  • Download URL: conda_ship-0.5.0.tar.gz
  • Upload date:
  • Size: 108.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for conda_ship-0.5.0.tar.gz
Algorithm Hash digest
SHA256 4cb4b7514c0a6792f09fc6cc8364920fa3de1c97a143f71859ec6ee06349902f
MD5 41c3dcc970191498eb14ccab269e9e5c
BLAKE2b-256 f04005d905194c5944b9ea64d62be843b5d36e28a7e795887941c1a964f685e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_ship-0.5.0.tar.gz:

Publisher: release.yml on jezdez/conda-ship

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_ship-0.5.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: conda_ship-0.5.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 6.8 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for conda_ship-0.5.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 8b195b11f4c3bde19e03384c61ff09a03bf537157a305252351f326d5dbcd409
MD5 b2f0be613f226785f8de31a567d89b8b
BLAKE2b-256 e65b2ce4276a469d9a4c6efe787215bd3adb82efaed1dda704e0073b4470ecfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_ship-0.5.0-py3-none-win_arm64.whl:

Publisher: release.yml on jezdez/conda-ship

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_ship-0.5.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: conda_ship-0.5.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 7.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for conda_ship-0.5.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1948b3b6daeee05cbc87f36d4d0bb6647d600f1a226b388c4b255826c0925f68
MD5 4eb3430d53f8ef610b65c2b421ccfb4d
BLAKE2b-256 745e17f81b2aa9041b5b3312c9faa05c1241a244cbce7c5f31cf9904d5999231

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_ship-0.5.0-py3-none-win_amd64.whl:

Publisher: release.yml on jezdez/conda-ship

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_ship-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for conda_ship-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 67d2c49eedff2d5e22d364ed32c7c6b732dc540d5752a3d6718e3758279f8386
MD5 e0af7fc7bc74ba6bdd0251e5b23a4a52
BLAKE2b-256 60a84477d91130609ea6d9eb2e693ce62419803cf7e862618e85e7e2e5809ff5

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_ship-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on jezdez/conda-ship

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_ship-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for conda_ship-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5c48925521604ef05a8dd66d879b453071ff6f50e44b18da3a5c8593a11b6ebe
MD5 3d40125d8e9860c1ed8259d8e7c29430
BLAKE2b-256 1b2931fd4e311399b084c884a1a03d414cbdd6a576a4a3f294913543153f2bc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_ship-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on jezdez/conda-ship

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_ship-0.5.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for conda_ship-0.5.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a83ad0cc1b8e15e631b3a3291f7691773dd6c1ef0f69b5fd3468aae009334b7c
MD5 72c18e6c9231f435b222959339273270
BLAKE2b-256 10b606da8fa1b875724c7266cbd9ffce9005deb1e2b41afcd7279d2efda435b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_ship-0.5.0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on jezdez/conda-ship

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_ship-0.5.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for conda_ship-0.5.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 765a2407360455804477d42ec5cfd46f49b1811134cf164ad9bb242f63ade5c8
MD5 97381fbd7dca52cc13e965c1546eff1a
BLAKE2b-256 93d8067016656ebdc3d6988610f0f9c5e3ef3ef5b256a50e6345e2fe1fe87e82

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_ship-0.5.0-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on jezdez/conda-ship

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page