Name | microvenv JSON |
Version |
2023.5
JSON |
| download |
home_page | |
Summary | A minimal re-implementation of Python's venv module plus utilities |
upload_time | 2023-10-18 21:56:17 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2023 Brett Cannon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
venv
virtual environments
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# microvenv
Create a minimal virtual environment (and utility code around environments).
The key purpose of this module is for when the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv) has been removed from the standard library by your Python distribution. Because `venv` is not available on PyPI and is developed in the stdlib, it is not possible to install it using `pip` or simply copy the code and expect it to work with older versions of Python. This module then attempts to be that portable alternative for creating virtual environments.
In general, though, using the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv) should be preferred and this module used as a fallback.
There is also utility code around virtual environments. See the [docs](https://microvenv.rtfd.io/) for details.
## CLI Usage
**NOTE**: The CLI is not available on Windows.
```console
python microvenv.py [--without-scm-ignore-files] [env_dir=".venv"]
```
If an argument is provided to the script, it is used as the path to create the virtual environment in. Otherwise, the virtual environment is created in `.venv`.
For programmatic usage, there is the `create()` function, which is analogous to the [`venv.create()` function](https://docs.python.org/3/library/venv.html#venv.create).
```python
def create(env_dir: os.PathLike[str] | str = ".venv", *, scm_ignore_files={"git"}) -> None
```
The `microvenv/_create.py` file is also small enough to have its contents passed in via the `-c` flag to `python`.
### Differences compared to the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv)
The code operates similarly to `py -m venv --symlinks --without-pip .venv`,
except that:
- There are no activation scripts (you can execute `python` in the virtual environment directly)
- Windows is not supported
Raw data
{
"_id": null,
"home_page": "",
"name": "microvenv",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Brett Cannon <brett@python.org>",
"keywords": "venv,virtual environments",
"author": "",
"author_email": "Brett Cannon <brett@python.org>",
"download_url": "https://files.pythonhosted.org/packages/fa/1b/c84a6ba06b1dc129ca9ea34917039fc3625598ddbf59f9872afc4ced0665/microvenv-2023.5.tar.gz",
"platform": null,
"description": "# microvenv\n\nCreate a minimal virtual environment (and utility code around environments).\n\nThe key purpose of this module is for when the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv) has been removed from the standard library by your Python distribution. Because `venv` is not available on PyPI and is developed in the stdlib, it is not possible to install it using `pip` or simply copy the code and expect it to work with older versions of Python. This module then attempts to be that portable alternative for creating virtual environments.\n\nIn general, though, using the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv) should be preferred and this module used as a fallback.\n\nThere is also utility code around virtual environments. See the [docs](https://microvenv.rtfd.io/) for details.\n\n## CLI Usage\n\n**NOTE**: The CLI is not available on Windows.\n\n```console\npython microvenv.py [--without-scm-ignore-files] [env_dir=\".venv\"]\n```\n\nIf an argument is provided to the script, it is used as the path to create the virtual environment in. Otherwise, the virtual environment is created in `.venv`.\n\nFor programmatic usage, there is the `create()` function, which is analogous to the [`venv.create()` function](https://docs.python.org/3/library/venv.html#venv.create).\n\n```python\ndef create(env_dir: os.PathLike[str] | str = \".venv\", *, scm_ignore_files={\"git\"}) -> None\n```\n\nThe `microvenv/_create.py` file is also small enough to have its contents passed in via the `-c` flag to `python`.\n\n### Differences compared to the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv)\n\nThe code operates similarly to `py -m venv --symlinks --without-pip .venv`,\nexcept that:\n\n- There are no activation scripts (you can execute `python` in the virtual environment directly)\n- Windows is not supported\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Brett Cannon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "A minimal re-implementation of Python's venv module plus utilities",
"version": "2023.5",
"project_urls": {
"Changelog": "https://github.com/brettcannon/microvenv/releases",
"Documentation": "https://microvenv.readthedocs.io/",
"Source": "https://github.com/brettcannon/microvenv"
},
"split_keywords": [
"venv",
"virtual environments"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "db06ffad1a0e92b2c6d7e4c0ee3694dca54c553714e3ba5d176a617a13f94abc",
"md5": "a68c9bf8b609af25b7b4a771989b06c0",
"sha256": "270977691d207d70308c4239221d2ffbbfd595fa1819d09680c75e8808b21254"
},
"downloads": -1,
"filename": "microvenv-2023.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a68c9bf8b609af25b7b4a771989b06c0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8163,
"upload_time": "2023-10-18T21:56:13",
"upload_time_iso_8601": "2023-10-18T21:56:13.863465Z",
"url": "https://files.pythonhosted.org/packages/db/06/ffad1a0e92b2c6d7e4c0ee3694dca54c553714e3ba5d176a617a13f94abc/microvenv-2023.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fa1bc84a6ba06b1dc129ca9ea34917039fc3625598ddbf59f9872afc4ced0665",
"md5": "7d86b472c5494b3a7c6166ad973ba675",
"sha256": "128c0c8ab46e3bbd7b4c902c8a5d6333b694f9ebf871f123b473425cb6fbe19f"
},
"downloads": -1,
"filename": "microvenv-2023.5.tar.gz",
"has_sig": false,
"md5_digest": "7d86b472c5494b3a7c6166ad973ba675",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11899,
"upload_time": "2023-10-18T21:56:17",
"upload_time_iso_8601": "2023-10-18T21:56:17.524832Z",
"url": "https://files.pythonhosted.org/packages/fa/1b/c84a6ba06b1dc129ca9ea34917039fc3625598ddbf59f9872afc4ced0665/microvenv-2023.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-18 21:56:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "brettcannon",
"github_project": "microvenv",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "microvenv"
}