Add pydo, a multi-Python command runner.
Review Request #13089 — Created June 1, 2023 and submitted — Latest diff uploaded
pydooptionally works along withvirtualenv-multiverto 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.
pydoaccepts a list of Python versions, which may include ranges
(e.g.,3.7-3.11). It looks for versioned scripts (likepip3.8or
easy_install-2.7) to run, and also handles runningpipusing
pythonX.Y -m pipsyntax to avoid issues with Python'spipscripts in
multi-versioned environments.If versions aren't provided on the command line,
pydowill 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.cfgfound in the current directory up to
the root.Some of the functionality will soon be used in
virtualenv-multiverto
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.