Skip to main content

virtualenv discovery plugin for tox 4 and multipython

Project description

virtualenv-multipython

virtualenv discovery plugin for multipython

license versions pypi
tested with multipython uses docsub

[!NOTE] virtualenv-multipython has twin plugin tox-multipython that serves similar purpose for tox 3

This virtualenv plugin comes pre-installed in multipython Docker image and is responsible for resolving tox environment name to Python executable. Most probably, you don't need to install it yourself.

Environment names supported are all multipython tags, including free threading Python builds py313t and py314t. More names may be added in the future.

Behaviour

  • Loosely follow behaviour of builtin virtualenv discovery, with differences listed below.
  • Try requests one by one, starting with --try-first-with; if one matches multipython tag or is an absolute path, return it to virtualenv.
  • If no request matched conditions above, fail to discover interpreter.
  • In particular, commands on PATH are not allowed.
  • If no version was requested at all, fall back to sys.executable.

Testing

There are two test suites:

  1. Virtualenv. Install virtualenv in host tag environment and create virtual environments for all target tags. Environment's python version must match target tag. In these tests we test all multipython tags as both host tags and target tags.
  2. Tox 4. tox and virtualenv are installed in host tag environment, and tox run is executed on tox.ini with env names equal to target tags. Tox environment's python version must match tox env name and target tag. This test includes subtests:
    • assert {env_python} version when tox env is activated
    • assert python version when tox env is activated
    • install externally built sample package in tox environment
    • execute entrypoint script of externally built sample package

Virtualenv supports discovery plugins since v20. In v20.22, it dropped support for Python <=3.6, in v20.27 it dropped support for Python 3.7.

This is why we use 6 different test setups:

  1. Virtualenv, virtualenv>=20
  2. Virtualenv, virtualenv>=20,<20.27
  3. Virtualenv, virtualenv>=20,<20.22
  4. Tox 4, tox>=4,<5, virtualenv>=20
  5. Tox 4, tox>=4,<5, virtualenv>=20,<20.27
  6. Tox 4, tox>=4,<5, virtualenv>=20,<20.22

Test report

When virtualenv-multipython is installed inside host tag environment, it allows to use selected โœ… target tag (create virtualenv environment or use as tox env name in env_list) and automatically discovers corresponding multipython executable. For prohibited ๐Ÿšซ๏ธ target tag, python executable is not discoverable. For failing ๐Ÿ’ฅ target tag, interpreter is discoverable, but virtual environment with sample package cannot be created.

Host tag and Target tags are valid multipython tags. Host tags are listed vertically (rows), target tags are listed horizontally (columns).

virtualenv>=20
  HOST    TARGETS
โ€”โ€”โ€”โ€”โ€”โ€”    Aโ€‚Bโ€‚Cโ€‚Dโ€‚Eโ€‚Fโ€‚Gโ€‚Hโ€‚Iโ€‚Jโ€‚Kโ€‚Lโ€‚M
py314t  A โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
py313t  B โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py314  C โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py313  D โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py312  E โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py311  F โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py310  G โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py39  H โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py38  I โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py37  J โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py36  K โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py35  L โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py27  M โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
tox>=4,<5, virtualenv>=20
  HOST    TARGETS
โ€”โ€”โ€”โ€”โ€”โ€”    Aโ€‚Bโ€‚Cโ€‚Dโ€‚Eโ€‚Fโ€‚Gโ€‚Hโ€‚Iโ€‚Jโ€‚Kโ€‚Lโ€‚M
py314t  A โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿ’ฅ๐Ÿšซ๐Ÿšซ๐Ÿšซ
py313t  B โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿ’ฅ๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py314  C โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿ’ฅ๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py313  D โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿ’ฅ๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py312  E โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿ’ฅ๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py311  F โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿ’ฅ๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py310  G โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿ’ฅ๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py39  H โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿ’ฅ๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py38  I โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿ’ฅ๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py37  J โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py36  K .โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.
  py35  L .โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.
  py27  M .โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.
virtualenv>=20,<20.27
  HOST    TARGETS
โ€”โ€”โ€”โ€”โ€”โ€”    Aโ€‚Bโ€‚Cโ€‚Dโ€‚Eโ€‚Fโ€‚Gโ€‚Hโ€‚Iโ€‚Jโ€‚Kโ€‚Lโ€‚M
py314t  A โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
py313t  B โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py314  C โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py313  D โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py312  E โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py311  F โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py310  G โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py39  H โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py38  I โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py37  J โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py36  K โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py35  L โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py27  M โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
tox>=4,<5, virtualenv>=20,<20.27
  HOST    TARGETS
โ€”โ€”โ€”โ€”โ€”โ€”    Aโ€‚Bโ€‚Cโ€‚Dโ€‚Eโ€‚Fโ€‚Gโ€‚Hโ€‚Iโ€‚Jโ€‚Kโ€‚Lโ€‚M
py314t  A โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
py313t  B โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py314  C โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py313  D โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py312  E โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py311  F โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
 py310  G โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py39  H โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py38  I โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py37  J โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…๐Ÿšซ๐Ÿšซ๐Ÿšซ
  py36  K .โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.
  py35  L .โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.
  py27  M .โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.
virtualenv>=20,<20.22
  HOST    TARGETS
โ€”โ€”โ€”โ€”โ€”โ€”    Aโ€‚Bโ€‚Cโ€‚Dโ€‚Eโ€‚Fโ€‚Gโ€‚Hโ€‚Iโ€‚Jโ€‚Kโ€‚Lโ€‚M
py314t  A โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
py313t  B โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py314  C โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py313  D โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py312  E โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py311  F โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py310  G โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py39  H โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py38  I โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py37  J โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py36  K โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py35  L โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py27  M โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
tox>=4,<5, virtualenv>=20,<20.22
  HOST    TARGETS
โ€”โ€”โ€”โ€”โ€”โ€”    Aโ€‚Bโ€‚Cโ€‚Dโ€‚Eโ€‚Fโ€‚Gโ€‚Hโ€‚Iโ€‚Jโ€‚Kโ€‚Lโ€‚M
py314t  A โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
py313t  B โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py314  C โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py313  D โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py312  E โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py311  F โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
 py310  G โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py39  H โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py38  I โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py37  J โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…โœ…
  py36  K .โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.
  py35  L .โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.
  py27  M .โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.โ€‚.

Authors

This package is a part of multipython project.

License

MIT License

Changelog

Check repository CHANGELOG.md

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

virtualenv_multipython-0.4.0.tar.gz (58.5 kB view details)

Uploaded Source

Built Distribution

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

virtualenv_multipython-0.4.0-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file virtualenv_multipython-0.4.0.tar.gz.

File metadata

File hashes

Hashes for virtualenv_multipython-0.4.0.tar.gz
Algorithm Hash digest
SHA256 5e0dc1e27db8363af72c5a2b036dd9feedce06ea8f5fe198eede8a2596c1d3f8
MD5 fa4bc1c80f8473037bd62ed39bd6c365
BLAKE2b-256 429ff78cdf3be841b33d67dde6df2e1f08fa075dc6e4e96befd324d9fefdd21b

See more details on using hashes here.

File details

Details for the file virtualenv_multipython-0.4.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for virtualenv_multipython-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ed1ca221257a41bb3e9f85bf41a8d77d610e0a45b246c1a66a5ce8b6487bc649
MD5 da4abb27938a5ac3b7f4e0ae14544ba2
BLAKE2b-256 867ae2742e7165aae647533281e3553f71d129b373a5a42e2d1868fa5d332822

See more details on using hashes here.

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