Skip to main content

Editable Python installs in git worktrees without copying heavy dependencies.

Project description

devpy-runner

devpy is a small command for running Python commands through a git-worktree-local .venv overlay backed by a named conda environment.

It is meant for development repos where conda owns the heavy dependency stack and the worktree-local .venv owns editable installs.

Status

This is an early prototype. Version 1 is intentionally conda-only.

Install

From this checkout:

python -m pip install -e ".[dev]"

That exposes the command:

devpy --help

Repo Setup

Add devpy.toml at the git root of a repo that should use devpy:

[python]
base_conda_env = "my-conda-env"

[editables]
packages = [
  ".",
]

For multiple editable local packages:

[python]
base_conda_env = "my-conda-env"

[editables]
packages = [
  ".",
  "../some-sibling-package",
  "../another-sibling-package",
]

Editable paths are resolved relative to the git root. They may point to sibling checkouts. The .venv path defaults to .venv and must stay inside the git root.

Add .venv/ to .gitignore.

Usage

Show the current setup:

devpy info

Create .venv if needed and install configured editables:

devpy update-editables

Run normal commands through the worktree .venv:

devpy python script.py
devpy pytest

Editable installs are intentionally not managed through ad hoc devpy pip install -e ... commands. Add editable packages to devpy.toml, then run devpy update-editables.

Remove the worktree .venv:

devpy clean

Behavior

devpy does this:

  1. Uses git rev-parse --show-toplevel to find the current git worktree root.

  2. Requires devpy.toml at that root.

  3. Creates .venv with:

    conda run -n <base_conda_env> --no-capture-output \
      python -m venv --system-site-packages .venv
    
  4. Runs normal commands with .venv/bin first on PATH.

  5. Sets PYTHONNOUSERSITE=1.

By default, update-editables uses pip install --no-deps -e ... because the base conda environment is expected to own dependencies. If a repo needs editable dependencies installed into .venv, set:

[editables]
install_deps = true
packages = ["."]

Unsupported By Design

Version 1 does not support uv-managed environments, non-conda base environments, or automatic dependency solving. Those can be added later if the conda-backed overlay workflow proves useful.

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

devpy_runner-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

devpy_runner-0.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file devpy_runner-0.1.1.tar.gz.

File metadata

  • Download URL: devpy_runner-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for devpy_runner-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e897e0463d8f24779a91c9b9bd3a413961dd5826aefc7027bdea4596221028a8
MD5 18db99b194f4fea69bcb481626c54de1
BLAKE2b-256 f68cbb61d3b9810962a9371fa16ebea6b6539d46662195a5a9ffc8e685d04e7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for devpy_runner-0.1.1.tar.gz:

Publisher: release.yml on alik-git/devpy-runner

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

File details

Details for the file devpy_runner-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: devpy_runner-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for devpy_runner-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7127335013b29bceae859a9606968d35a0c6d23a46117529b4f459d845fbe53b
MD5 7c94904cde02b4f8a3b64300815236a4
BLAKE2b-256 cbac5dada95f6599e754724d75b497d25a43d39c5a5dd1b0f7f3a09c6ad80f50

See more details on using hashes here.

Provenance

The following attestation bundles were made for devpy_runner-0.1.1-py3-none-any.whl:

Publisher: release.yml on alik-git/devpy-runner

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