forked from AFPy/python-docs-fr
476 lines
16 KiB
Plaintext
476 lines
16 KiB
Plaintext
|
# SOME DESCRIPTIVE TITLE.
|
||
|
# Copyright (C) 2001-2016, Python Software Foundation
|
||
|
# This file is distributed under the same license as the Python package.
|
||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||
|
#
|
||
|
#, fuzzy
|
||
|
msgid ""
|
||
|
msgstr ""
|
||
|
"Project-Id-Version: Python 3.5\n"
|
||
|
"Report-Msgid-Bugs-To: \n"
|
||
|
"POT-Creation-Date: 2016-10-30 10:42+0100\n"
|
||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||
|
"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 "
|
||
|
"(allowing creation of environments with various Python versions) and can "
|
||
|
"have its own independent set of installed Python packages in its site "
|
||
|
"directories."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:24
|
||
|
msgid "See :pep:`405` for more information about Python virtual environments."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:27
|
||
|
msgid ""
|
||
|
"The `pyvenv` script has been deprecated as of Python 3.6 in favor of using "
|
||
|
"``python3 -m venv`` to help prevent any potential confusion as to which "
|
||
|
"Python interpreter a virtual environment will be based on."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:33
|
||
|
msgid "Creating virtual environments"
|
||
|
msgstr "Création d'environnements virtuels"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:1
|
||
|
msgid ""
|
||
|
"Creation of :ref:`virtual environments <venv-def>` is done by executing the "
|
||
|
"``pyvenv`` script::"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:6
|
||
|
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 the command was run "
|
||
|
"from. 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-"
|
||
|
"packages`` subdirectory (on Windows, this is ``Lib\\site-packages``)."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:16
|
||
|
msgid ""
|
||
|
"`Python Packaging User Guide: Creating and using virtual environments "
|
||
|
"<https://packaging.python.org/en/latest/installing/#creating-virtual-"
|
||
|
"environments>`__"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:21
|
||
|
msgid ""
|
||
|
"On Windows, you may have to invoke the ``pyvenv`` script as follows, if you "
|
||
|
"don't have the relevant PATH and PATHEXT settings::"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:26
|
||
|
msgid "or equivalently::"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:30
|
||
|
msgid "The command, if run with ``-h``, will show the available options::"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:56
|
||
|
msgid ""
|
||
|
"Depending on how the ``venv`` functionality has been invoked, the usage "
|
||
|
"message may vary slightly, e.g. referencing ``pyvenv`` rather than ``venv``."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:59
|
||
|
msgid ""
|
||
|
"Installs pip by default, added the ``--without-pip`` and ``--copies`` "
|
||
|
"options"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:63
|
||
|
msgid ""
|
||
|
"In earlier versions, if the target directory already existed, an error was "
|
||
|
"raised, unless the ``--clear`` or ``--upgrade`` option was provided. Now, if "
|
||
|
"an existing directory is specified, its contents are removed and the "
|
||
|
"directory is processed as if it had been newly created."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:69
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:73
|
||
|
msgid ""
|
||
|
"Unless the ``--without-pip`` option is given, :mod:`ensurepip` will be "
|
||
|
"invoked to bootstrap ``pip`` into the virtual environment."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:76
|
||
|
msgid ""
|
||
|
"Multiple paths can be given to ``pyvenv``, in which case an identical "
|
||
|
"virtualenv will be created, according to the given options, at each provided "
|
||
|
"path."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:80
|
||
|
msgid ""
|
||
|
"Once a venv has been created, it can be \"activated\" using a script in the "
|
||
|
"venv's binary directory. The invocation of the script is platform-specific:"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:84
|
||
|
msgid "Platform"
|
||
|
msgstr "Plateforme"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:84
|
||
|
msgid "Shell"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:84
|
||
|
msgid "Command to activate virtual environment"
|
||
|
msgstr "Commande pour activer l'environnement virtuel"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:86
|
||
|
msgid "Posix"
|
||
|
msgstr "Posix"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:86
|
||
|
msgid "bash/zsh"
|
||
|
msgstr "bash/zsh"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:86
|
||
|
msgid "$ source <venv>/bin/activate"
|
||
|
msgstr "$ source <venv>/bin/activate"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:88
|
||
|
msgid "fish"
|
||
|
msgstr "fish"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:88
|
||
|
msgid "$ . <venv>/bin/activate.fish"
|
||
|
msgstr "$ . <venv>/bin/activate.fish"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:90
|
||
|
msgid "csh/tcsh"
|
||
|
msgstr "csh/tcsh"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:90
|
||
|
msgid "$ source <venv>/bin/activate.csh"
|
||
|
msgstr "$ source <venv>/bin/activate.csh"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:92
|
||
|
msgid "Windows"
|
||
|
msgstr "Windows"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:92
|
||
|
msgid "cmd.exe"
|
||
|
msgstr "cmd.exe"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:92
|
||
|
msgid "C:\\\\> <venv>\\\\Scripts\\\\activate.bat"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:94
|
||
|
msgid "PowerShell"
|
||
|
msgstr "PowerShell"
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:94
|
||
|
msgid "PS C:\\\\> <venv>\\\\Scripts\\\\Activate.ps1"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:97
|
||
|
msgid ""
|
||
|
"You don't specifically *need* to activate an environment; activation just "
|
||
|
"prepends the venv's binary directory to your path, so that \"python\" "
|
||
|
"invokes the venv's Python interpreter and you can run installed scripts "
|
||
|
"without having to use their full path. However, all scripts installed in a "
|
||
|
"venv should be runnable without activating it, and run with the venv's "
|
||
|
"Python automatically."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:103
|
||
|
msgid ""
|
||
|
"You can deactivate a venv 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 venv is created."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/using/venv-create.inc:109
|
||
|
msgid "``fish`` and ``csh`` activation scripts."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:40
|
||
|
msgid ""
|
||
|
"A virtual environment (also called a ``venv``) 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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:46
|
||
|
msgid ""
|
||
|
"A venv is a directory tree which contains Python executable files and other "
|
||
|
"files which indicate that it is a venv."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:49
|
||
|
msgid ""
|
||
|
"Common installation tools such as ``Setuptools`` and ``pip`` work as "
|
||
|
"expected with venvs - i.e. when a venv is active, they install Python "
|
||
|
"packages into the venv without needing to be told to do so explicitly."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:53
|
||
|
msgid ""
|
||
|
"When a venv is active (i.e. the venv's Python interpreter is running), the "
|
||
|
"attributes :attr:`sys.prefix` and :attr:`sys.exec_prefix` point to the base "
|
||
|
"directory of the venv, whereas :attr:`sys.base_prefix` and :attr:`sys."
|
||
|
"base_exec_prefix` point to the non-venv Python installation which was used "
|
||
|
"to create the venv. If a venv 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-venv Python "
|
||
|
"installation)."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:62
|
||
|
msgid ""
|
||
|
"When a venv 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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:66
|
||
|
msgid ""
|
||
|
"When working in a command shell, users can make a venv active by running an "
|
||
|
"``activate`` script in the venv's executables directory (the precise "
|
||
|
"filename is shell-dependent), which prepends the venv's directory for "
|
||
|
"executables to the ``PATH`` environment variable for the running shell. "
|
||
|
"There should be no need in other circumstances to activate a venv -- scripts "
|
||
|
"installed into venvs have a shebang line which points to the venv'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 venv in ``PATH``."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:83
|
||
|
msgid "API"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:87
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:94
|
||
|
msgid ""
|
||
|
"The :class:`EnvBuilder` class accepts the following keyword arguments on "
|
||
|
"instantiation:"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:97
|
||
|
msgid ""
|
||
|
"``system_site_packages`` -- a Boolean value indicating that the system "
|
||
|
"Python site-packages should be available to the environment (defaults to "
|
||
|
"``False``)."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:100
|
||
|
msgid ""
|
||
|
"``clear`` -- a Boolean value which, if true, will delete the contents of any "
|
||
|
"existing target directory, before creating the environment."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:103
|
||
|
msgid ""
|
||
|
"``symlinks`` -- a Boolean value indicating whether to attempt to symlink the "
|
||
|
"Python binary (and any necessary DLLs or other binaries, e.g. ``pythonw."
|
||
|
"exe``), rather than copying. Defaults to ``True`` on Linux and Unix systems, "
|
||
|
"but ``False`` on Windows."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:108
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:112
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:116 ../Doc/library/venv.rst:221
|
||
|
msgid "Added the ``with_pip`` parameter"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:120
|
||
|
msgid ""
|
||
|
"Creators of third-party virtual environment tools will be free to use the "
|
||
|
"provided ``EnvBuilder`` class as a base class."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:123
|
||
|
msgid "The returned env-builder is an object which has a method, ``create``:"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:127
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:133
|
||
|
msgid ""
|
||
|
"The ``create`` method of the ``EnvBuilder`` class illustrates the hooks "
|
||
|
"available for subclass customization::"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:148
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:154
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:162
|
||
|
msgid "Creates the ``pyvenv.cfg`` configuration file in the environment."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:166
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:174
|
||
|
msgid ""
|
||
|
"Installs activation scripts appropriate to the platform into the virtual "
|
||
|
"environment."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:179
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:183
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:189
|
||
|
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 ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:195
|
||
|
msgid ""
|
||
|
"``__VENV_DIR__`` is replaced with the absolute path of the environment "
|
||
|
"directory."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:198
|
||
|
msgid ""
|
||
|
"``__VENV_NAME__`` is replaced with the environment name (final path segment "
|
||
|
"of environment directory)."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:201
|
||
|
msgid ""
|
||
|
"``__VENV_PROMPT__`` is replaced with the prompt (the environment name "
|
||
|
"surrounded by parentheses and with a following space)"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:204
|
||
|
msgid ""
|
||
|
"``__VENV_BIN_NAME__`` is replaced with the name of the bin directory (either "
|
||
|
"``bin`` or ``Scripts``)."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:207
|
||
|
msgid ""
|
||
|
"``__VENV_PYTHON__`` is replaced with the absolute path of the environment's "
|
||
|
"executable."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:210
|
||
|
msgid ""
|
||
|
"The directories are allowed to exist (for when an existing environment is "
|
||
|
"being upgraded)."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:213
|
||
|
msgid "There is also a module-level convenience function:"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:218
|
||
|
msgid ""
|
||
|
"Create an :class:`EnvBuilder` with the given keyword arguments, and call "
|
||
|
"its :meth:`~EnvBuilder.create` method with the *env_dir* argument."
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:225
|
||
|
msgid "An example of extending ``EnvBuilder``"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:227
|
||
|
msgid ""
|
||
|
"The following script shows how to extend :class:`EnvBuilder` by implementing "
|
||
|
"a subclass which installs setuptools and pip into a created venv::"
|
||
|
msgstr ""
|
||
|
|
||
|
#: ../Doc/library/venv.rst:442
|
||
|
msgid ""
|
||
|
"This script is also available for download `online <https://gist.github."
|
||
|
"com/4673395>`_."
|
||
|
msgstr ""
|