Add pydo, a multi-Python command runner.

Review Request #13089 — Created June 1, 2023 and submitted

Information

virtualenv-multiver
master

Reviewers

pydo optionally works along with virtualenv-multiver to help run a
command across a range of Python versions. This is useful for installing
dependencies, setting up development environments, or performing various
tests on multiple Python versions with one command.

pydo accepts a list of Python versions, which may include ranges
(e.g., 3.7-3.11). It looks for versioned scripts (like pip3.8 or
easy_install-2.7) to run, and also handles running pip using
pythonX.Y -m pip syntax to avoid issues with Python's pip scripts in
multi-versioned environments.

If versions aren't provided on the command line, pydo will look for
versions recorded in $VIRTUAL_ENV/.pydorc. This is created when
generating a new multi-version environment.

If that's not present, versions are loaded from any .pydorc,
pyproject.toml, or setup.cfg found in the current directory up to
the root.

Some of the functionality will soon be used in virtualenv-multiver to
ease environment creation.

Been using this for environments for quite a while.

Tested with the various configuration files at different levels in the
tree.

Tested with and without ranges and duplicate specified versions.

Summary ID
Add pydo, a multi-Python command runner.
`pydo` optionally works along with `virtualenv-multiver` to help run a command across a range of Python versions. This is useful for installing dependencies, setting up development environments, or performing various tests on multiple Python versions with one command. `pydo` accepts a list of Python versions, which may include ranges (e.g., `3.7-3.11`). It looks for versioned scripts (like `pip3.8` or `easy_install-2.7`) to run, and also handles running `pip` using `pythonX.Y -m pip` syntax to avoid issues with Python's `pip` scripts in multi-versioned environments. If versions aren't provided on the command line, `pydo` will look for versions recorded in `$VIRTUAL_ENV/.pydorc`. This is created when generating a new multi-version environment. If that's not present, versions are loaded from any `.pydorc`, `pyproject.toml`, or `setup.cfg` found in the current directory up to the root. Some of the functionality will soon be used in `virtualenv-multiver` to ease environment creation.
ab47be0214735361041a4b11ab67c9cde0acd284
Description From Last Updated

'tomllib as tomlo' imported but unused Column: 5 Error code: F401

reviewbotreviewbot

'shutil' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'virtualenv_multiver.utils.PyVerError' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

invalid escape sequence '\s' Column: 35 Error code: W605

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...