summaryrefslogtreecommitdiffstats
path: root/Doc/library/venv.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/venv.rst')
-rw-r--r--Doc/library/venv.rst21
1 files changed, 17 insertions, 4 deletions
diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst
index 2dd21e5..efc2137 100644
--- a/Doc/library/venv.rst
+++ b/Doc/library/venv.rst
@@ -85,7 +85,8 @@ The high-level method described above makes use of a simple API which provides
mechanisms for third-party virtual environment creators to customize environment
creation according to their needs, the :class:`EnvBuilder` class.
-.. class:: EnvBuilder(system_site_packages=False, clear=False, symlinks=False, upgrade=False)
+.. class:: EnvBuilder(system_site_packages=False, clear=False, \
+ symlinks=False, upgrade=False, with_pip=False)
The :class:`EnvBuilder` class accepts the following keyword arguments on
instantiation:
@@ -93,8 +94,8 @@ creation according to their needs, the :class:`EnvBuilder` class.
* ``system_site_packages`` -- a Boolean value indicating that the system Python
site-packages should be available to the environment (defaults to ``False``).
- * ``clear`` -- a Boolean value which, if True, will delete any existing target
- directory instead of raising an exception (defaults to ``False``).
+ * ``clear`` -- a Boolean value which, if True, will delete the contents of
+ any existing target directory, before creating the environment.
* ``symlinks`` -- a Boolean value indicating whether to attempt to symlink the
Python binary (and any necessary DLLs or other binaries,
@@ -105,6 +106,11 @@ creation according to their needs, the :class:`EnvBuilder` class.
environment with the running Python - for use when that Python has been
upgraded in-place (defaults to ``False``).
+ * ``with_pip`` -- a Boolean value which, if True, ensures pip is
+ installed in the virtual environment
+
+ .. versionchanged:: 3.4
+ Added the ``with_pip`` parameter
Creators of third-party virtual environment tools will be free to use the
@@ -188,6 +194,9 @@ creation according to their needs, the :class:`EnvBuilder` class.
* ``__VENV_NAME__`` is replaced with the environment name (final path
segment of environment directory).
+ * ``__VENV_PROMPT__`` is replaced with the prompt (the environment
+ name surrounded by parentheses and with a following space)
+
* ``__VENV_BIN_NAME__`` is replaced with the name of the bin directory
(either ``bin`` or ``Scripts``).
@@ -199,11 +208,15 @@ creation according to their needs, the :class:`EnvBuilder` class.
There is also a module-level convenience function:
-.. function:: create(env_dir, system_site_packages=False, clear=False, symlinks=False)
+.. function:: create(env_dir, system_site_packages=False, clear=False, \
+ symlinks=False, with_pip=False)
Create an :class:`EnvBuilder` with the given keyword arguments, and call its
:meth:`~EnvBuilder.create` method with the *env_dir* argument.
+ .. versionchanged:: 3.4
+ Added the ``with_pip`` parameter
+
An example of extending ``EnvBuilder``
--------------------------------------