2018-07-04 09:06:45 +00:00
|
|
|
|
# Copyright (C) 2001-2018, Python Software Foundation
|
2018-07-04 09:08:42 +00:00
|
|
|
|
# For licence information, see README file.
|
2016-10-30 09:46:26 +00:00
|
|
|
|
#
|
|
|
|
|
msgid ""
|
|
|
|
|
msgstr ""
|
|
|
|
|
"Project-Id-Version: Python 3.6\n"
|
|
|
|
|
"Report-Msgid-Bugs-To: \n"
|
2018-09-15 20:37:31 +00:00
|
|
|
|
"POT-Creation-Date: 2018-09-15 21:52+0200\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
|
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
2018-07-04 09:14:25 +00:00
|
|
|
|
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
2017-05-23 22:40:56 +00:00
|
|
|
|
"Language: fr\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"MIME-Version: 1.0\n"
|
|
|
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
|
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
|
|
|
#: ../Doc/library/venv.rst:2
|
|
|
|
|
msgid ":mod:`venv` --- Creation of virtual environments"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
|
|
#: ../Doc/library/venv.rst:12
|
|
|
|
|
msgid "**Source code:** :source:`Lib/venv/`"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
|
|
#: ../Doc/library/venv.rst:18
|
|
|
|
|
msgid ""
|
|
|
|
|
"The :mod:`venv` module provides support for creating lightweight \"virtual "
|
|
|
|
|
"environments\" with their own site directories, optionally isolated from "
|
|
|
|
|
"system site directories. Each virtual environment has its own Python binary "
|
2018-08-13 13:12:45 +00:00
|
|
|
|
"(which matches the version of the binary that was used to create this "
|
|
|
|
|
"environment) and can have its own independent set of installed Python "
|
|
|
|
|
"packages in its site directories."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:25
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "See :pep:`405` for more information about Python virtual environments."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:29
|
|
|
|
|
msgid ""
|
|
|
|
|
"`Python Packaging User Guide: Creating and using virtual environments "
|
|
|
|
|
"<https://packaging.python.org/installing/#creating-virtual-environments>`__"
|
|
|
|
|
msgstr ""
|
|
|
|
|
"`Guide Utilisateur de l'Empaquetage Python : Créer et utiliser des "
|
|
|
|
|
"environnements virtuels <https://packaging.python.org/installing/#creating-"
|
|
|
|
|
"virtual-environments>`__"
|
|
|
|
|
|
|
|
|
|
#: ../Doc/library/venv.rst:33
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
2017-04-02 20:14:06 +00:00
|
|
|
|
"The ``pyvenv`` script has been deprecated as of Python 3.6 in favor of using "
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"``python3 -m venv`` to help prevent any potential confusion as to which "
|
|
|
|
|
"Python interpreter a virtual environment will be based on."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:39
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Creating virtual environments"
|
|
|
|
|
msgstr "Création d'environnements virtuels"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:1
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Creation of :ref:`virtual environments <venv-def>` is done by executing the "
|
|
|
|
|
"command ``venv``::"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:6
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"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 of the ``python`` binary (or binaries, in the "
|
|
|
|
|
"case of Windows). It also creates an (initially empty) ``lib/pythonX.Y/site-"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
"packages`` subdirectory (on Windows, this is ``Lib\\site-packages``). If an "
|
|
|
|
|
"existing directory is specified, it will be re-used."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:15
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``pyvenv`` was the recommended tool for creating virtual environments for "
|
|
|
|
|
"Python 3.3 and 3.4, and is `deprecated in Python 3.6 <https://docs.python."
|
|
|
|
|
"org/dev/whatsnew/3.6.html#deprecated-features>`_."
|
|
|
|
|
msgstr ""
|
2017-05-25 15:41:14 +00:00
|
|
|
|
"``pyvenv`` était l'outil recommandé pour créer des environnements sous "
|
2018-06-10 22:04:53 +00:00
|
|
|
|
"Python 3.3 et 3.4, et est `obsolète depuis Python 3.6 <https://docs.python."
|
2017-05-25 15:41:14 +00:00
|
|
|
|
"org/dev/whatsnew/3.6.html#deprecated-features>`_."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:20
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The use of ``venv`` is now recommended for creating virtual environments."
|
|
|
|
|
msgstr ""
|
2017-05-25 15:41:14 +00:00
|
|
|
|
"L'utilisation de ``venv`` est maintenant recommandée pour créer vos "
|
|
|
|
|
"environnements virtuels."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:25
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "On Windows, invoke the ``venv`` command as follows::"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:29
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Alternatively, if you configured the ``PATH`` and ``PATHEXT`` variables for "
|
|
|
|
|
"your :ref:`Python installation <using-on-windows>`::"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:34
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "The command, if run with ``-h``, will show the available options::"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:64
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Installs pip by default, added the ``--without-pip`` and ``--copies`` "
|
|
|
|
|
"options"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:68
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"In earlier versions, if the target directory already existed, an error was "
|
2018-03-23 08:57:03 +00:00
|
|
|
|
"raised, unless the ``--clear`` or ``--upgrade`` option was provided."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:72
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The created ``pyvenv.cfg`` file also includes the ``include-system-site-"
|
|
|
|
|
"packages`` key, set to ``true`` if ``venv`` is run with the ``--system-site-"
|
|
|
|
|
"packages`` option, ``false`` otherwise."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:76
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Unless the ``--without-pip`` option is given, :mod:`ensurepip` will be "
|
|
|
|
|
"invoked to bootstrap ``pip`` into the virtual environment."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:79
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Multiple paths can be given to ``venv``, in which case an identical virtual "
|
|
|
|
|
"environment will be created, according to the given options, at each "
|
|
|
|
|
"provided path."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:83
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Once a virtual environment has been created, it can be \"activated\" using a "
|
|
|
|
|
"script in the virtual environment's binary directory. The invocation of the "
|
|
|
|
|
"script is platform-specific:"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:88
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Platform"
|
|
|
|
|
msgstr "Plateforme"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:88
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Shell"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:88
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Command to activate virtual environment"
|
|
|
|
|
msgstr "Commande pour activer l'environnement virtuel"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:90
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Posix"
|
|
|
|
|
msgstr "Posix"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:90
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "bash/zsh"
|
|
|
|
|
msgstr "bash/zsh"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:90
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "$ source <venv>/bin/activate"
|
|
|
|
|
msgstr "$ source <venv>/bin/activate"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:92
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "fish"
|
|
|
|
|
msgstr "fish"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:92
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "$ . <venv>/bin/activate.fish"
|
|
|
|
|
msgstr "$ . <venv>/bin/activate.fish"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:94
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "csh/tcsh"
|
|
|
|
|
msgstr "csh/tcsh"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:94
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "$ source <venv>/bin/activate.csh"
|
|
|
|
|
msgstr "$ source <venv>/bin/activate.csh"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:96
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Windows"
|
|
|
|
|
msgstr "Windows"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:96
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "cmd.exe"
|
|
|
|
|
msgstr "cmd.exe"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:96
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "C:\\\\> <venv>\\\\Scripts\\\\activate.bat"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:98
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "PowerShell"
|
|
|
|
|
msgstr "PowerShell"
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:98
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "PS C:\\\\> <venv>\\\\Scripts\\\\Activate.ps1"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:101
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"You don't specifically *need* to activate an environment; activation just "
|
|
|
|
|
"prepends the virtual environment's binary directory to your path, so that "
|
|
|
|
|
"\"python\" invokes the virtual environment's Python interpreter and you can "
|
|
|
|
|
"run installed scripts without having to use their full path. However, all "
|
|
|
|
|
"scripts installed in a virtual environment should be runnable without "
|
|
|
|
|
"activating it, and run with the virtual environment's Python automatically."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:108
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"You can deactivate a virtual environment by typing \"deactivate\" in your "
|
|
|
|
|
"shell. The exact mechanism is platform-specific: for example, the Bash "
|
|
|
|
|
"activation script defines a \"deactivate\" function, whereas on Windows "
|
|
|
|
|
"there are separate scripts called ``deactivate.bat`` and ``Deactivate.ps1`` "
|
|
|
|
|
"which are installed when the virtual environment is created."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-09-15 20:37:31 +00:00
|
|
|
|
#: ../Doc/using/venv-create.inc <included from
|
|
|
|
|
#: /home/mdk/clones/cpython/Doc/library/venv.rst>:114
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "``fish`` and ``csh`` activation scripts."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:46
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"A virtual environment is a Python environment such that the Python "
|
|
|
|
|
"interpreter, libraries and scripts installed into it are isolated from those "
|
|
|
|
|
"installed in other virtual environments, and (by default) any libraries "
|
|
|
|
|
"installed in a \"system\" Python, i.e., one which is installed as part of "
|
|
|
|
|
"your operating system."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:52
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"A virtual environment is a directory tree which contains Python executable "
|
|
|
|
|
"files and other files which indicate that it is a virtual environment."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:55
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Common installation tools such as ``Setuptools`` and ``pip`` work as "
|
|
|
|
|
"expected with virtual environments. In other words, when a virtual "
|
|
|
|
|
"environment is active, they install Python packages into the virtual "
|
|
|
|
|
"environment without needing to be told to do so explicitly."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:60
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"When a virtual environment is active (i.e., the virtual environment's Python "
|
|
|
|
|
"interpreter is running), the attributes :attr:`sys.prefix` and :attr:`sys."
|
|
|
|
|
"exec_prefix` point to the base directory of the virtual environment, "
|
|
|
|
|
"whereas :attr:`sys.base_prefix` and :attr:`sys.base_exec_prefix` point to "
|
|
|
|
|
"the non-virtual environment Python installation which was used to create the "
|
|
|
|
|
"virtual environment. If a virtual environment is not active, then :attr:`sys."
|
|
|
|
|
"prefix` is the same as :attr:`sys.base_prefix` and :attr:`sys.exec_prefix` "
|
|
|
|
|
"is the same as :attr:`sys.base_exec_prefix` (they all point to a non-virtual "
|
|
|
|
|
"environment Python installation)."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:71
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"When a virtual environment is active, any options that change the "
|
|
|
|
|
"installation path will be ignored from all distutils configuration files to "
|
|
|
|
|
"prevent projects being inadvertently installed outside of the virtual "
|
|
|
|
|
"environment."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:76
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"When working in a command shell, users can make a virtual environment active "
|
|
|
|
|
"by running an ``activate`` script in the virtual environment's executables "
|
|
|
|
|
"directory (the precise filename is shell-dependent), which prepends the "
|
|
|
|
|
"virtual environment's directory for executables to the ``PATH`` environment "
|
|
|
|
|
"variable for the running shell. There should be no need in other "
|
|
|
|
|
"circumstances to activate a virtual environment—scripts installed into "
|
|
|
|
|
"virtual environments have a \"shebang\" line which points to the virtual "
|
|
|
|
|
"environment's Python interpreter. This means that the script will run with "
|
|
|
|
|
"that interpreter regardless of the value of ``PATH``. On Windows, \"shebang"
|
|
|
|
|
"\" line processing is supported if you have the Python Launcher for Windows "
|
|
|
|
|
"installed (this was added to Python in 3.3 - see :pep:`397` for more "
|
|
|
|
|
"details). Thus, double-clicking an installed script in a Windows Explorer "
|
|
|
|
|
"window should run the script with the correct interpreter without there "
|
|
|
|
|
"needing to be any reference to its virtual environment in ``PATH``."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:95
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "API"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:99
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"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."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:107
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The :class:`EnvBuilder` class accepts the following keyword arguments on "
|
|
|
|
|
"instantiation:"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:110
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``system_site_packages`` -- a Boolean value indicating that the system "
|
|
|
|
|
"Python site-packages should be available to the environment (defaults to "
|
|
|
|
|
"``False``)."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:113
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``clear`` -- a Boolean value which, if true, will delete the contents of any "
|
|
|
|
|
"existing target directory, before creating the environment."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:116
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``symlinks`` -- a Boolean value indicating whether to attempt to symlink the "
|
|
|
|
|
"Python binary (and any necessary DLLs or other binaries, e.g. ``pythonw."
|
2018-06-10 09:32:30 +00:00
|
|
|
|
"exe``), rather than copying."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:120
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``upgrade`` -- a Boolean value which, if true, will upgrade an existing "
|
|
|
|
|
"environment with the running Python - for use when that Python has been "
|
|
|
|
|
"upgraded in-place (defaults to ``False``)."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:124
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``with_pip`` -- a Boolean value which, if true, ensures pip is installed in "
|
|
|
|
|
"the virtual environment. This uses :mod:`ensurepip` with the ``--default-"
|
|
|
|
|
"pip`` option."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:128
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``prompt`` -- a String to be used after virtual environment is activated "
|
|
|
|
|
"(defaults to ``None`` which means directory name of the environment would be "
|
|
|
|
|
"used)."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:132 ../Doc/library/venv.rst:240
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Added the ``with_pip`` parameter"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:135
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Added the ``prompt`` parameter"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:139
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Creators of third-party virtual environment tools will be free to use the "
|
|
|
|
|
"provided ``EnvBuilder`` class as a base class."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:142
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "The returned env-builder is an object which has a method, ``create``:"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:146
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This method takes as required argument the path (absolute or relative to the "
|
|
|
|
|
"current directory) of the target directory which is to contain the virtual "
|
|
|
|
|
"environment. The ``create`` method will either create the environment in "
|
|
|
|
|
"the specified directory, or raise an appropriate exception."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:152
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The ``create`` method of the ``EnvBuilder`` class illustrates the hooks "
|
|
|
|
|
"available for subclass customization::"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:167
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Each of the methods :meth:`ensure_directories`, :meth:"
|
|
|
|
|
"`create_configuration`, :meth:`setup_python`, :meth:`setup_scripts` and :"
|
|
|
|
|
"meth:`post_setup` can be overridden."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:173
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Creates the environment directory and all necessary directories, and returns "
|
|
|
|
|
"a context object. This is just a holder for attributes (such as paths), for "
|
|
|
|
|
"use by the other methods. The directories are allowed to exist already, as "
|
|
|
|
|
"long as either ``clear`` or ``upgrade`` were specified to allow operating on "
|
|
|
|
|
"an existing environment directory."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:181
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Creates the ``pyvenv.cfg`` configuration file in the environment."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:185
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Creates a copy of the Python executable (and, under Windows, DLLs) in the "
|
|
|
|
|
"environment. On a POSIX system, if a specific executable ``python3.x`` was "
|
|
|
|
|
"used, symlinks to ``python`` and ``python3`` will be created pointing to "
|
|
|
|
|
"that executable, unless files with those names already exist."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:193
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Installs activation scripts appropriate to the platform into the virtual "
|
|
|
|
|
"environment."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:198
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"A placeholder method which can be overridden in third party implementations "
|
|
|
|
|
"to pre-install packages in the virtual environment or perform other post-"
|
|
|
|
|
"creation steps."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:202
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"In addition, :class:`EnvBuilder` provides this utility method that can be "
|
|
|
|
|
"called from :meth:`setup_scripts` or :meth:`post_setup` in subclasses to "
|
|
|
|
|
"assist in installing custom scripts into the virtual environment."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:208
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"*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 :data:`os.name` are copied after some text replacement of "
|
|
|
|
|
"placeholders:"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:214
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``__VENV_DIR__`` is replaced with the absolute path of the environment "
|
|
|
|
|
"directory."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:217
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``__VENV_NAME__`` is replaced with the environment name (final path segment "
|
|
|
|
|
"of environment directory)."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:220
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``__VENV_PROMPT__`` is replaced with the prompt (the environment name "
|
|
|
|
|
"surrounded by parentheses and with a following space)"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:223
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``__VENV_BIN_NAME__`` is replaced with the name of the bin directory (either "
|
|
|
|
|
"``bin`` or ``Scripts``)."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:226
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"``__VENV_PYTHON__`` is replaced with the absolute path of the environment's "
|
|
|
|
|
"executable."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:229
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The directories are allowed to exist (for when an existing environment is "
|
|
|
|
|
"being upgraded)."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:232
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "There is also a module-level convenience function:"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:237
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Create an :class:`EnvBuilder` with the given keyword arguments, and call "
|
|
|
|
|
"its :meth:`~EnvBuilder.create` method with the *env_dir* argument."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:244
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "An example of extending ``EnvBuilder``"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:246
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The following script shows how to extend :class:`EnvBuilder` by implementing "
|
|
|
|
|
"a subclass which installs setuptools and pip into a created virtual "
|
|
|
|
|
"environment::"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-08-13 13:12:45 +00:00
|
|
|
|
#: ../Doc/library/venv.rst:465
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
2018-06-28 13:32:56 +00:00
|
|
|
|
"This script is also available for download `online <https://gist.github.com/"
|
|
|
|
|
"vsajip/4673395>`_."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|