| Crates.io | uv-virtualenv |
| lib.rs | uv-virtualenv |
| version | 0.0.15 |
| created_at | 2025-11-21 01:09:18.069304+00 |
| updated_at | 2026-01-15 20:53:22.025671+00 |
| description | This is an internal component crate of uv |
| homepage | https://pypi.org/project/uv/ |
| repository | https://github.com/astral-sh/uv |
| max_upload_size | |
| id | 1942890 |
| size | 207,178 |
uv-virtualenv is a rust library to create Python virtual environments. It also has a CLI.
This crate tries to stay in sync with pypa/virtualenv project's activation scripts. However, there are some deviations that are specific to this crate's implementation.
This crate includes license information at the top of each activation script. This is done in accordance with the pypa/virtualenv project's MIT License. Do not remove the declarative license comments from this crate's activation scripts.
Note, these activation scripts are actually templates that are populated with certain values when a virtual environment is created.
In upstream, the placeholder names are found in
virtualenv.activation.ViaTemplateActivator.replacements().
In this crate, the placeholder names are found in
uv_virtualenv::virtualenv::create()
It is important that the placeholder names (as used in the activation scripts) conform to the placeholders names used in this crate's source.
This crate uses some additional tweaks in the activation scripts to ensure the virtual environment is relocatable. Thus, the patch in astral-sh/uv#5640 shall be retained.
The patches in upstream virtualenv (pypa/virtualenv#2928 and pypa/virtualenv#2940) implement dynamically locating the TCL/TK libraries of a base Python distribution (see upstream approach).
This upstream implementation is considered an undesirable complexity in this project. As such, the upstream TCL/TK related patches shall be omitted when syncing activation scripts with upstream sources.