summaryrefslogtreecommitdiffstats
path: root/Doc/using
diff options
context:
space:
mode:
authorBrett Cannon <54418+brettcannon@users.noreply.github.com>2019-06-28 19:14:31 (GMT)
committerGitHub <noreply@github.com>2019-06-28 19:14:31 (GMT)
commitf9f8e3ce709ceb15c8db8c8dde940daf1febf13d (patch)
tree10868ca4f4d0abcbaf9ed58fe8f5216d55886911 /Doc/using
parent242c26f53edb965e9808dd918089e664c0223407 (diff)
downloadcpython-f9f8e3ce709ceb15c8db8c8dde940daf1febf13d.zip
cpython-f9f8e3ce709ceb15c8db8c8dde940daf1febf13d.tar.gz
cpython-f9f8e3ce709ceb15c8db8c8dde940daf1febf13d.tar.bz2
bpo-37403: Touch up venv docs (GH-14458)
Add a versionadded for PS Core and note that `.venv` is a common virtual environment name.
Diffstat (limited to 'Doc/using')
-rw-r--r--Doc/using/venv-create.inc21
1 files changed, 14 insertions, 7 deletions
diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc
index 8fd107b..46bf0b4 100644
--- a/Doc/using/venv-create.inc
+++ b/Doc/using/venv-create.inc
@@ -6,12 +6,13 @@ command ``venv``::
Running this command creates the target directory (creating any parent
directories that don't exist already) and places a ``pyvenv.cfg`` file in it
with a ``home`` key pointing to the Python installation from which the command
-was run. It also creates a ``bin`` (or ``Scripts`` on Windows) subdirectory
-containing a copy/symlink of the Python binary/binaries (as appropriate for the
-platform or arguments used at environment creation time). It also creates an
-(initially empty) ``lib/pythonX.Y/site-packages`` subdirectory
-(on Windows, this is ``Lib\site-packages``). If an existing
-directory is specified, it will be re-used.
+was run (a common name for the target directory is ``.venv``). It also creates
+a ``bin`` (or ``Scripts`` on Windows) subdirectory containing a copy/symlink
+of the Python binary/binaries (as appropriate for the platform or arguments
+used at environment creation time). It also creates an (initially empty)
+``lib/pythonX.Y/site-packages`` subdirectory (on Windows, this is
+``Lib\site-packages``). If an existing directory is specified, it will be
+re-used.
.. deprecated:: 3.6
``pyvenv`` was the recommended tool for creating virtual environments for
@@ -101,12 +102,14 @@ directory containing the virtual environment):
+-------------+-----------------+-----------------------------------------+
| Platform | Shell | Command to activate virtual environment |
+=============+=================+=========================================+
-| Posix | bash/zsh | $ source <venv>/bin/activate |
+| POSIX | bash/zsh | $ source <venv>/bin/activate |
+-------------+-----------------+-----------------------------------------+
| | fish | $ . <venv>/bin/activate.fish |
+-------------+-----------------+-----------------------------------------+
| | csh/tcsh | $ source <venv>/bin/activate.csh |
+-------------+-----------------+-----------------------------------------+
+| | PowerShell Core | $ <venv>/bin/Activate.ps1 |
++-------------+-----------------+-----------------------------------------+
| Windows | cmd.exe | C:\\> <venv>\\Scripts\\activate.bat |
+-------------+-----------------+-----------------------------------------+
| | PowerShell | PS C:\\> <venv>\\Scripts\\Activate.ps1 |
@@ -127,3 +130,7 @@ when the virtual environment is created.
.. versionadded:: 3.4
``fish`` and ``csh`` activation scripts.
+
+.. versionadded:: 3.8
+ PowerShell activation scripts installed under POSIX for PowerShell Core
+ support.