Add pydo, a multi-Python command runner.
Review Request #13089 — Created June 1, 2023 and submitted — Latest diff uploaded
pydo
optionally works along withvirtualenv-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 (likepip3.8
or
easy_install-2.7
) to run, and also handles runningpip
using
pythonX.Y -m pip
syntax to avoid issues with Python'spip
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
, orsetup.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.