Add pydo, a multi-Python command runner.

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

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.

Commits

Files