summaryrefslogtreecommitdiffstats
path: root/Lib/venv
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-01-30 10:34:12 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-01-30 10:34:12 (GMT)
commit5586ba7643e608827fc7109a40e851f3cae0f2e4 (patch)
tree178dabd63526298d13ed5acb8eb6efa4084e8e79 /Lib/venv
parentf98aca5c238d8f5e799eb1a61f10239bca7f0cd7 (diff)
downloadcpython-5586ba7643e608827fc7109a40e851f3cae0f2e4.zip
cpython-5586ba7643e608827fc7109a40e851f3cae0f2e4.tar.gz
cpython-5586ba7643e608827fc7109a40e851f3cae0f2e4.tar.bz2
Simply docstrings of venv module
This will hopefully make maintenance of venv documentation easier. For example, see commits a4f0d76af176 and 5764cc02244d. This patch has been reviewed by Vinaj Sajip, the maintainer of venv module.
Diffstat (limited to 'Lib/venv')
-rw-r--r--Lib/venv/__init__.py40
1 files changed, 1 insertions, 39 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index 74245ab..fa3d2a3 100644
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -3,28 +3,6 @@ Virtual environment (venv) package for Python. Based on PEP 405.
Copyright (C) 2011-2014 Vinay Sajip.
Licensed to the PSF under a contributor agreement.
-
-usage: python -m venv [-h] [--system-site-packages] [--symlinks] [--clear]
- [--upgrade]
- ENV_DIR [ENV_DIR ...]
-
-Creates virtual Python environments in one or more target directories.
-
-positional arguments:
- ENV_DIR A directory to create the environment in.
-
-optional arguments:
- -h, --help show this help message and exit
- --system-site-packages
- Give the virtual environment access to the system
- site-packages dir.
- --symlinks Attempt to symlink rather than copy.
- --clear Delete the contents of the environment directory if it
- already exists, before environment creation.
- --upgrade Upgrade the environment directory to use this version
- of Python, assuming Python has been upgraded in-place.
- --without-pip Skips installing or upgrading pip in the virtual
- environment (pip is bootstrapped by default)
"""
import logging
import os
@@ -349,23 +327,7 @@ class EnvBuilder:
def create(env_dir, system_site_packages=False, clear=False,
symlinks=False, with_pip=False):
- """
- Create a virtual environment in a directory.
-
- By default, makes the system (global) site-packages dir *un*available to
- the created environment, and uses copying rather than symlinking for files
- obtained from the source Python installation.
-
- :param env_dir: The target directory to create an environment in.
- :param system_site_packages: If True, the system (global) site-packages
- dir is available to the environment.
- :param clear: If True, delete the contents of the environment directory if
- it already exists, before environment creation.
- :param symlinks: If True, attempt to symlink rather than copy files into
- virtual environment.
- :param with_pip: If True, ensure pip is installed in the virtual
- environment
- """
+ """Create a virtual environment in a directory."""
builder = EnvBuilder(system_site_packages=system_site_packages,
clear=clear, symlinks=symlinks, with_pip=with_pip)
builder.create(env_dir)