venv.EnvBuilder.install_scripts()

install_scripts(context, path)

path is the path to a directory that should contain subdirectories “common”, “posix”, “nt”, each containing scripts destined for the bin directory in the environment. The contents of “common” and the directory corresponding to os.name are copied after some text replacement of placeholders:

  • __VENV_DIR__ is replaced with the absolute path of the environment directory.
  • __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).
  • __VENV_PYTHON__ is replaced with the absolute path of the environment’s executable.

The directories are allowed to exist (for when an existing environment is being upgraded).

doc_python
2016-10-07 17:47:10
Comments
Leave a Comment

Please login to continue.