# virtualenv-multipython
> [virtualenv](http://virtualenv.pypa.io) discovery plugin for [multipython](https://github.com/makukha/multipython)
<!-- docsub: begin -->
<!-- docsub: include docs/part/badges.md -->
[](https://github.com/makukha/virtualenv-multipython/blob/main/LICENSE)
[](https://pypi.python.org/pypi/virtualenv-multipython)
[](https://pypi.org/project/virtualenv-multipython)
[](https://github.com/makukha/multipython)
[](https://github.com/makukha/docsub)
<!-- docsub: end -->
<!-- docsub: begin -->
<!-- docsub: include docs/part/main.md -->
<!-- docsub: begin #noinstall -->
<!-- docsub: include ../../docs/part/plugin-noinstall.md -->
This plugin is intended to be installed under [multipython](https://github.com/makukha/multipython) docker image. This is done automatically during multipython release, and there seems to be no reason to install this plugin manually by anyone.
<!-- docsub: end #noinstall -->
Environment names supported are all [multipython](https://github.com/makukha/multipython) tags.
This plugin allows to use multipython tags in virtualenv:
```shell
$ virtualenv --python py314t /tmp/venv
```
## Behaviour
* Loosely follow behaviour of builtin virtualenv discovery, with some important differences:
* Try requests one by one, starting with [`--try-first-with`](https://virtualenv.pypa.io/en/latest/cli_interface.html#try-first-with); if one matches multipython tag or is an absolute path, return it to virtualenv.
* If no version was requested at all, use `sys.executable`
* If no request matched conditions above, fail to discover interpreter.
* In particular, command names on `PATH` are not discovered.
## Installation
```shell
$ pip install virtualenv-multipython
```
## Configuration
Set `multipython` to be the default discovery method for virtualenv:
### Option 1. Environment variable
```shell
VIRTUALENV_DISCOVERY=multipython
````
### Option 2. Configuration file
```ini
[virtualenv]
discovery = multipython
```
Add these lines to one of [virtualenv configuration files](https://virtualenv.pypa.io/en/latest/cli_interface.html#conf-file). Under e.g. Debian `root`, the file is `/root/.config/virtualenv/virtualenv.ini`
<!-- docsub: end -->
## Changelog
* Starting from v0.5.0: [makukha/multipython-plugins](https://github.com/makukha/multipython-plugins/tree/main/CHANGELOG.md)
* Before v0.5.0 — [makukha/virtualenv-multipython](https://github.com/makukha/virtualenv-multipython/tree/main/CHANGELOG.md)
Raw data
{
"_id": null,
"home_page": null,
"name": "virtualenv-multipython",
"maintainer": null,
"docs_url": null,
"requires_python": "!=3.0,!=3.1,!=3.2,!=3.3,!=3.4,>=2.7",
"maintainer_email": null,
"keywords": "discovery, multipython, plugin, testing, tox, virtualenv, virtualenv-discovery, virtualenv-plugin",
"author": null,
"author_email": "Michael Makukha <m.makukha@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/b8/3a/514beba4f4b7ca2d08a171efe34faf955a74427b6c5b1f2755b132ce8c0c/virtualenv_multipython-0.5.1.tar.gz",
"platform": null,
"description": "# virtualenv-multipython\n> [virtualenv](http://virtualenv.pypa.io) discovery plugin for [multipython](https://github.com/makukha/multipython)\n\n<!-- docsub: begin -->\n<!-- docsub: include docs/part/badges.md -->\n[](https://github.com/makukha/virtualenv-multipython/blob/main/LICENSE)\n[](https://pypi.python.org/pypi/virtualenv-multipython)\n[](https://pypi.org/project/virtualenv-multipython)\n[](https://github.com/makukha/multipython)\n[](https://github.com/makukha/docsub)\n<!-- docsub: end -->\n\n\n<!-- docsub: begin -->\n<!-- docsub: include docs/part/main.md -->\n<!-- docsub: begin #noinstall -->\n<!-- docsub: include ../../docs/part/plugin-noinstall.md -->\nThis plugin is intended to be installed under [multipython](https://github.com/makukha/multipython) docker image. This is done automatically during multipython release, and there seems to be no reason to install this plugin manually by anyone.\n<!-- docsub: end #noinstall -->\n\nEnvironment names supported are all [multipython](https://github.com/makukha/multipython) tags.\n\nThis plugin allows to use multipython tags in virtualenv:\n\n```shell\n$ virtualenv --python py314t /tmp/venv\n```\n\n## Behaviour\n\n* Loosely follow behaviour of builtin virtualenv discovery, with some important differences:\n* Try requests one by one, starting with [`--try-first-with`](https://virtualenv.pypa.io/en/latest/cli_interface.html#try-first-with); if one matches multipython tag or is an absolute path, return it to virtualenv.\n* If no version was requested at all, use `sys.executable`\n* If no request matched conditions above, fail to discover interpreter.\n* In particular, command names on `PATH` are not discovered.\n\n## Installation\n\n```shell\n$ pip install virtualenv-multipython\n```\n\n## Configuration\n\nSet `multipython` to be the default discovery method for virtualenv:\n\n### Option 1. Environment variable\n\n```shell\nVIRTUALENV_DISCOVERY=multipython\n````\n\n### Option 2. Configuration file\n\n```ini\n[virtualenv]\ndiscovery = multipython\n```\n\nAdd these lines to one of [virtualenv configuration files](https://virtualenv.pypa.io/en/latest/cli_interface.html#conf-file). Under e.g. Debian `root`, the file is `/root/.config/virtualenv/virtualenv.ini`\n<!-- docsub: end -->\n\n\n## Changelog\n\n* Starting from v0.5.0: [makukha/multipython-plugins](https://github.com/makukha/multipython-plugins/tree/main/CHANGELOG.md)\n* Before v0.5.0 \u2014 [makukha/virtualenv-multipython](https://github.com/makukha/virtualenv-multipython/tree/main/CHANGELOG.md)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "virtualenv discovery plugin for multipython and tox 4",
"version": "0.5.1",
"project_urls": {
"Changelog": "https://github.com/makukha/multipython-plugins/tree/main/CHANGELOG.md",
"Homepage": "https://github.com/makukha/multipython-plugins#virtualenv-multipython",
"Issues": "https://github.com/makukha/multipython-plugins/issues",
"Repository": "https://github.com/makukha/multipython-plugins"
},
"split_keywords": [
"discovery",
" multipython",
" plugin",
" testing",
" tox",
" virtualenv",
" virtualenv-discovery",
" virtualenv-plugin"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3f82da1fce9d09179f293524e7e1d8bdd3867bcd20308a6c9725d6895e03af46",
"md5": "7c28a1ad8c26194c337b45f71c5f07d7",
"sha256": "30d63506ed6481a74e8af8fa607f0b0ce3c0b947222bb37db6790127ba5d0acf"
},
"downloads": -1,
"filename": "virtualenv_multipython-0.5.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c28a1ad8c26194c337b45f71c5f07d7",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": "!=3.0,!=3.1,!=3.2,!=3.3,!=3.4,>=2.7",
"size": 5923,
"upload_time": "2025-01-26T21:57:10",
"upload_time_iso_8601": "2025-01-26T21:57:10.013920Z",
"url": "https://files.pythonhosted.org/packages/3f/82/da1fce9d09179f293524e7e1d8bdd3867bcd20308a6c9725d6895e03af46/virtualenv_multipython-0.5.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b83a514beba4f4b7ca2d08a171efe34faf955a74427b6c5b1f2755b132ce8c0c",
"md5": "74deab4c5a3d7a50df62e9cd743f2036",
"sha256": "6c5cc6a3576559a7e642fac3f4b41381c9e27d6b3f65834468d1e49d44716789"
},
"downloads": -1,
"filename": "virtualenv_multipython-0.5.1.tar.gz",
"has_sig": false,
"md5_digest": "74deab4c5a3d7a50df62e9cd743f2036",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "!=3.0,!=3.1,!=3.2,!=3.3,!=3.4,>=2.7",
"size": 4692,
"upload_time": "2025-01-26T21:57:12",
"upload_time_iso_8601": "2025-01-26T21:57:12.943968Z",
"url": "https://files.pythonhosted.org/packages/b8/3a/514beba4f4b7ca2d08a171efe34faf955a74427b6c5b1f2755b132ce8c0c/virtualenv_multipython-0.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-26 21:57:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "makukha",
"github_project": "multipython-plugins",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "virtualenv-multipython"
}