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 ""
|
2019-12-05 22:15:54 +00:00
|
|
|
|
"Project-Id-Version: Python 3\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"Report-Msgid-Bugs-To: \n"
|
2019-09-04 09:35:23 +00:00
|
|
|
|
"POT-Creation-Date: 2019-09-04 11:33+0200\n"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"PO-Revision-Date: 2019-08-06 09:57+0200\n"
|
2019-09-04 09:35:23 +00:00
|
|
|
|
"Last-Translator: Zepmanbc <zepman@gmail.com>\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"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"X-Generator: Poedit 2.2.3\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:2
|
2018-09-15 20:37:31 +00:00
|
|
|
|
msgid ":mod:`zipapp` --- Manage executable Python zip archives"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr ":mod:`zipapp` — Gestion des archives zip exécutables Python"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:9
|
|
|
|
|
msgid "**Source code:** :source:`Lib/zipapp.py`"
|
|
|
|
|
msgstr "**Code source :** :source:`Lib/zipapp.py`"
|
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:16
|
|
|
|
|
msgid ""
|
|
|
|
|
"This module provides tools to manage the creation of zip files containing "
|
|
|
|
|
"Python code, which can be :ref:`executed directly by the Python interpreter "
|
|
|
|
|
"<using-on-interface-options>`. The module provides both a :ref:`zipapp-"
|
|
|
|
|
"command-line-interface` and a :ref:`zipapp-python-api`."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Ce module fournit des outils pour gérer la création de fichiers zip "
|
|
|
|
|
"contenant du code Python, qui peuvent être :ref:`exécutés directement par "
|
|
|
|
|
"l'interpréteur Python <using-on-interface-options>`. Le module fournit à la "
|
|
|
|
|
"fois une interface de ligne de commande :ref:`zipapp-command-line-interface` "
|
|
|
|
|
"et une interface :ref:`zipapp-python-api`."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:23
|
|
|
|
|
msgid "Basic Example"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Exemple de base"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:25
|
|
|
|
|
msgid ""
|
|
|
|
|
"The following example shows how the :ref:`zipapp-command-line-interface` can "
|
|
|
|
|
"be used to create an executable archive from a directory containing Python "
|
|
|
|
|
"code. When run, the archive will execute the ``main`` function from the "
|
|
|
|
|
"module ``myapp`` in the archive."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"L'exemple suivant montre comment l'interface de ligne de commande :ref:"
|
|
|
|
|
"`zipapp-command-line-interface` peut être utilisée pour créer une archive "
|
|
|
|
|
"exécutable depuis un répertoire contenant du code Python. Lors de "
|
|
|
|
|
"l'exécution, l'archive exécutera la fonction ``main`` du module ``myapp`` "
|
|
|
|
|
"dans l'archive."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:40
|
|
|
|
|
msgid "Command-Line Interface"
|
2018-11-30 17:31:12 +00:00
|
|
|
|
msgstr "Interface en ligne de commande"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:42
|
|
|
|
|
msgid ""
|
|
|
|
|
"When called as a program from the command line, the following form is used:"
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Lorsqu'il est appelé en tant que programme à partir de la ligne de commande, "
|
|
|
|
|
"la syntaxe suivante est utilisée :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:48
|
|
|
|
|
msgid ""
|
|
|
|
|
"If *source* is a directory, this will create an archive from the contents of "
|
|
|
|
|
"*source*. If *source* is a file, it should be an archive, and it will be "
|
|
|
|
|
"copied to the target archive (or the contents of its shebang line will be "
|
|
|
|
|
"displayed if the --info option is specified)."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si *source* est un répertoire, une archive est créée à partir du contenu de "
|
|
|
|
|
"*source*. Si *source* est un fichier, ce doit être une archive et il est "
|
|
|
|
|
"copié dans l'archive cible (ou le contenu de sa ligne `shebang` est affiché "
|
|
|
|
|
"si l'option ``--info`` est indiquée)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:53
|
|
|
|
|
msgid "The following options are understood:"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Les options suivantes sont disponibles :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:59
|
|
|
|
|
msgid ""
|
|
|
|
|
"Write the output to a file named *output*. If this option is not specified, "
|
|
|
|
|
"the output filename will be the same as the input *source*, with the "
|
|
|
|
|
"extension ``.pyz`` added. If an explicit filename is given, it is used as "
|
|
|
|
|
"is (so a ``.pyz`` extension should be included if required)."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Écrit la sortie dans un fichier nommé *output*. Si cette option n'est pas "
|
|
|
|
|
"spécifiée, le nom du fichier de sortie sera le même que celui de l'entrée "
|
|
|
|
|
"*source*, avec l'extension ``.pyz``. Si un nom de fichier explicite est "
|
|
|
|
|
"donné, il est utilisé tel quel (une extension ``.pyz`` doit donc être "
|
|
|
|
|
"incluse si nécessaire)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:64
|
|
|
|
|
msgid ""
|
|
|
|
|
"An output filename must be specified if the *source* is an archive (and in "
|
|
|
|
|
"that case, *output* must not be the same as *source*)."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Un nom de fichier de sortie doit être spécifié si la *source* est une "
|
|
|
|
|
"archive (et, dans ce cas, la *sortie* ne doit pas être la même que la "
|
|
|
|
|
"*source*)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:69
|
|
|
|
|
msgid ""
|
|
|
|
|
"Add a ``#!`` line to the archive specifying *interpreter* as the command to "
|
|
|
|
|
"run. Also, on POSIX, make the archive executable. The default is to write "
|
|
|
|
|
"no ``#!`` line, and not make the file executable."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Ajoute une ligne ``#!`` à l'archive en spécifiant *interpreter* comme "
|
|
|
|
|
"commande à exécuter. Aussi, sur un système POSIX, cela rend l'archive "
|
|
|
|
|
"exécutable. Le comportement par défaut est de ne pas écrire la ligne ``#!`` "
|
|
|
|
|
"et de ne pas rendre le fichier exécutable."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:75
|
|
|
|
|
msgid ""
|
|
|
|
|
"Write a ``__main__.py`` file to the archive that executes *mainfn*. The "
|
|
|
|
|
"*mainfn* argument should have the form \"pkg.mod:fn\", where \"pkg.mod\" is "
|
|
|
|
|
"a package/module in the archive, and \"fn\" is a callable in the given "
|
|
|
|
|
"module. The ``__main__.py`` file will execute that callable."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Écrit un fichier ``__main__.py`` dans l'archive qui exécute *mainfn*. "
|
|
|
|
|
"L'argument *mainfn* est de la forme « *pkg.mod:fn* », où « *pkg.mod* » est "
|
|
|
|
|
"un paquet/module dans l'archive, et « *fn* » est un appelable dans le module "
|
|
|
|
|
"donné. Le fichier ``__main__.py`` réalise cet appel."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:80
|
|
|
|
|
msgid ":option:`--main` cannot be specified when copying an archive."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
":option:`--main` ne peut pas être spécifié lors de la copie d'une archive."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:84
|
|
|
|
|
msgid ""
|
2018-06-28 13:32:56 +00:00
|
|
|
|
"Compress files with the deflate method, reducing the size of the output "
|
|
|
|
|
"file. By default, files are stored uncompressed in the archive."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Compresse les fichiers avec la méthode *deflate*, réduisant ainsi la taille "
|
|
|
|
|
"du fichier de sortie. Par défaut, les fichiers sont stockés non compressés "
|
|
|
|
|
"dans l'archive."
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:87
|
|
|
|
|
msgid ":option:`--compress` has no effect when copying an archive."
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr ":option:`--compress` n'a aucun effet lors de la copie d'une archive."
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:93
|
|
|
|
|
msgid ""
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"Display the interpreter embedded in the archive, for diagnostic purposes. "
|
|
|
|
|
"In this case, any other options are ignored and SOURCE must be an archive, "
|
|
|
|
|
"not a directory."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Affiche l'interpréteur intégré dans l'archive, à des fins de diagnostic. "
|
|
|
|
|
"Dans ce cas, toutes les autres options sont ignorées et SOURCE doit être une "
|
|
|
|
|
"archive et non un répertoire."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:99
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Print a short usage message and exit."
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Affiche un court message d'aide et quitte."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:105
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Python API"
|
|
|
|
|
msgstr "API Python"
|
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:107
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "The module defines two convenience functions:"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Ce module définit deux fonctions utilitaires :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:112
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Create an application archive from *source*. The source can be any of the "
|
|
|
|
|
"following:"
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Crée une archive d'application à partir de *source*. La source peut être de "
|
|
|
|
|
"natures suivantes :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:115
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
2018-06-28 13:32:56 +00:00
|
|
|
|
"The name of a directory, or a :term:`path-like object` referring to a "
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"directory, in which case a new application archive will be created from the "
|
|
|
|
|
"content of that directory."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Le nom d'un répertoire, ou un :term:`path-like object` se référant à un "
|
|
|
|
|
"répertoire ; dans ce cas, une nouvelle archive d'application sera créée à "
|
|
|
|
|
"partir du contenu de ce répertoire."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:118
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
2018-06-28 13:32:56 +00:00
|
|
|
|
"The name of an existing application archive file, or a :term:`path-like "
|
|
|
|
|
"object` referring to such a file, in which case the file is copied to the "
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"target (modifying it to reflect the value given for the *interpreter* "
|
|
|
|
|
"argument). The file name should include the ``.pyz`` extension, if required."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Le nom d'un fichier d'archive d'application existant, ou un :term:`path-like "
|
|
|
|
|
"object` se référant à un tel fichier ; dans ce cas, le fichier est copié sur "
|
|
|
|
|
"la cible (en le modifiant pour refléter la valeur donnée à l'argument "
|
|
|
|
|
"*interpreter*). Le nom du fichier doit inclure l'extension ``.pyz``, si "
|
|
|
|
|
"nécessaire."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:122
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"A file object open for reading in bytes mode. The content of the file "
|
|
|
|
|
"should be an application archive, and the file object is assumed to be "
|
|
|
|
|
"positioned at the start of the archive."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Un objet fichier ouvert pour la lecture en mode binaire. Le contenu du "
|
|
|
|
|
"fichier doit être une archive d'application et Python suppose que l'objet "
|
|
|
|
|
"fichier est positionné au début de l'archive."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:126
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The *target* argument determines where the resulting archive will be written:"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "L'argument *target* détermine où l'archive résultante sera écrite :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:129
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
2018-06-28 13:32:56 +00:00
|
|
|
|
"If it is the name of a file, or a :term:`path-like object`, the archive will "
|
|
|
|
|
"be written to that file."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"S'il s'agit d'un nom de fichier, ou d'un :term:`path-like object`, l'archive "
|
|
|
|
|
"sera écrite dans ce fichier."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:131
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If it is an open file object, the archive will be written to that file "
|
|
|
|
|
"object, which must be open for writing in bytes mode."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"S'il s'agit d'un objet fichier ouvert, l'archive sera écrite dans cet objet "
|
|
|
|
|
"fichier, qui doit être ouvert pour l'écriture en mode octets."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:133
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If the target is omitted (or ``None``), the source must be a directory and "
|
|
|
|
|
"the target will be a file with the same name as the source, with a ``.pyz`` "
|
|
|
|
|
"extension added."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si la cible est omise (ou ``None``), la source doit être un répertoire et la "
|
|
|
|
|
"cible sera un fichier portant le même nom que la source, avec une extension "
|
|
|
|
|
"``.pyz`` ajoutée."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:137
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The *interpreter* argument specifies the name of the Python interpreter with "
|
|
|
|
|
"which the archive will be executed. It is written as a \"shebang\" line at "
|
|
|
|
|
"the start of the archive. On POSIX, this will be interpreted by the OS, and "
|
|
|
|
|
"on Windows it will be handled by the Python launcher. Omitting the "
|
|
|
|
|
"*interpreter* results in no shebang line being written. If an interpreter "
|
|
|
|
|
"is specified, and the target is a filename, the executable bit of the target "
|
|
|
|
|
"file will be set."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"L'argument *interpreter* spécifie le nom de l'interpréteur Python avec "
|
|
|
|
|
"lequel l'archive sera exécutée. Il est écrit dans une ligne *shebang* au "
|
|
|
|
|
"début de l'archive. Sur un système POSIX, cela est interprété par le "
|
|
|
|
|
"système d'exploitation et, sur Windows, il sera géré par le lanceur Python. "
|
|
|
|
|
"L'omission de l'*interpreter* n'entraîne pas l'écriture d'une ligne "
|
|
|
|
|
"*shebang*. Si un interpréteur est spécifié et que la cible est un nom de "
|
|
|
|
|
"fichier, le bit exécutable du fichier cible sera mis à 1."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:145
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The *main* argument specifies the name of a callable which will be used as "
|
|
|
|
|
"the main program for the archive. It can only be specified if the source is "
|
|
|
|
|
"a directory, and the source does not already contain a ``__main__.py`` "
|
|
|
|
|
"file. The *main* argument should take the form \"pkg.module:callable\" and "
|
|
|
|
|
"the archive will be run by importing \"pkg.module\" and executing the given "
|
|
|
|
|
"callable with no arguments. It is an error to omit *main* if the source is "
|
|
|
|
|
"a directory and does not contain a ``__main__.py`` file, as otherwise the "
|
|
|
|
|
"resulting archive would not be executable."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"L'argument *main* spécifie le nom d'un appelable, utilisé comme programme "
|
|
|
|
|
"principal pour l'archive. Il ne peut être spécifié que si la source est un "
|
|
|
|
|
"répertoire et si la source ne contient pas déjà un fichier ``__main__.py``. "
|
|
|
|
|
"L'argument *main* doit prendre la forme ``pkg.module:callable`` et l'archive "
|
|
|
|
|
"sera exécutée en important ``pkg.module`` et en exécutant l'appelable donné "
|
|
|
|
|
"sans argument. Omettre *main* est une erreur si la source est un répertoire "
|
|
|
|
|
"et ne contient pas un fichier ``__main__.py`` car, dans ce cas, l'archive "
|
|
|
|
|
"résultante ne serait pas exécutable."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:155
|
|
|
|
|
msgid ""
|
|
|
|
|
"The optional *filter* argument specifies a callback function that is passed "
|
|
|
|
|
"a Path object representing the path to the file being added (relative to the "
|
|
|
|
|
"source directory). It should return ``True`` if the file is to be added."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"L'argument optionnel *filter* spécifie une fonction de rappel à laquelle on "
|
|
|
|
|
"passe un objet *Path* représentant le chemin du fichier à ajouter (par "
|
|
|
|
|
"rapport au répertoire source). Elle doit renvoyer ``True`` si le fichier "
|
|
|
|
|
"doit effectivement être ajouté."
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:160
|
|
|
|
|
msgid ""
|
|
|
|
|
"The optional *compressed* argument determines whether files are compressed. "
|
|
|
|
|
"If set to ``True``, files in the archive are compressed with the deflate "
|
|
|
|
|
"method; otherwise, files are stored uncompressed. This argument has no "
|
|
|
|
|
"effect when copying an existing archive."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"L'argument optionnel *compressed* détermine si les fichiers doivent être "
|
|
|
|
|
"compressés. S'il vaut ``True``, les fichiers de l'archive sont compressés "
|
|
|
|
|
"avec l'algorithme *deflate* ; sinon, les fichiers sont stockés non "
|
|
|
|
|
"compressés. Cet argument n'a aucun effet lors de la copie d'une archive "
|
|
|
|
|
"existante."
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:165
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If a file object is specified for *source* or *target*, it is the caller's "
|
|
|
|
|
"responsibility to close it after calling create_archive."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si un objet fichier est spécifié pour *source* ou *target*, il est de la "
|
|
|
|
|
"responsabilité de l'appelant de le fermer après avoir appelé "
|
|
|
|
|
"``create_archive``."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:168
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"When copying an existing archive, file objects supplied only need ``read`` "
|
|
|
|
|
"and ``readline``, or ``write`` methods. When creating an archive from a "
|
|
|
|
|
"directory, if the target is a file object it will be passed to the ``zipfile."
|
|
|
|
|
"ZipFile`` class, and must supply the methods needed by that class."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Lors de la copie d'une archive existante, les objets fichier fournis n'ont "
|
|
|
|
|
"besoin que des méthodes ``read`` et ``readline`` ou ``write``. Lors de la "
|
|
|
|
|
"création d'une archive à partir d'un répertoire, si la cible est un objet "
|
|
|
|
|
"fichier, elle sera passée à la classe ``zipfile.ZipFile`` et devra fournir "
|
|
|
|
|
"les méthodes nécessaires à cette classe."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:174
|
|
|
|
|
msgid "Added the *filter* and *compressed* arguments."
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Ajout des arguments *filter* et *compressed*."
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
|
|
|
|
#: ../Doc/library/zipapp.rst:179
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Return the interpreter specified in the ``#!`` line at the start of the "
|
|
|
|
|
"archive. If there is no ``#!`` line, return :const:`None`. The *archive* "
|
|
|
|
|
"argument can be a filename or a file-like object open for reading in bytes "
|
|
|
|
|
"mode. It is assumed to be at the start of the archive."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Renvoie l'interpréteur spécifié dans la ligne ``#!`` au début de l'archive. "
|
|
|
|
|
"S'il n'y a pas de ligne ``#!``, renvoie :const:`None`. L'argument *archive* "
|
|
|
|
|
"peut être un nom de fichier ou un objet de type fichier ouvert à la lecture "
|
|
|
|
|
"en mode binaire. Python suppose qu'il est au début de l'archive."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:188
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Examples"
|
|
|
|
|
msgstr "Exemples"
|
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:190
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Pack up a directory into an archive, and run it."
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Regroupe le contenu d'un répertoire dans une archive, puis l'exécute."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:198
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "The same can be done using the :func:`create_archive` function::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"La même chose peut être faite en utilisant la fonction :func:"
|
2020-02-05 22:32:21 +00:00
|
|
|
|
"`create_archive` ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:203
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"To make the application directly executable on POSIX, specify an interpreter "
|
|
|
|
|
"to use."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Pour rendre l'application directement exécutable sur un système POSIX, "
|
|
|
|
|
"spécifiez un interpréteur à utiliser."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:212
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"To replace the shebang line on an existing archive, create a modified "
|
|
|
|
|
"archive using the :func:`create_archive` function::"
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Pour remplacer la ligne *shebang* sur une archive existante, créez une "
|
2020-02-05 22:32:21 +00:00
|
|
|
|
"archive modifiée en utilisant la fonction :func:`create_archive` ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:218
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"To update the file in place, do the replacement in memory using a :class:"
|
|
|
|
|
"`BytesIO` object, and then overwrite the source afterwards. Note that there "
|
|
|
|
|
"is a risk when overwriting a file in place that an error will result in the "
|
|
|
|
|
"loss of the original file. This code does not protect against such errors, "
|
|
|
|
|
"but production code should do so. Also, this method will only work if the "
|
|
|
|
|
"archive fits in memory::"
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Pour mettre à jour le fichier sans créer de copie locale, effectuez le "
|
|
|
|
|
"remplacement en mémoire à l'aide d'un objet :class:`BytesIO`, puis écrasez "
|
|
|
|
|
"la source par la suite. Notez qu'il y a un risque lors de l'écrasement d'un "
|
|
|
|
|
"fichier local qu'une erreur entraîne la perte du fichier original. Ce code "
|
|
|
|
|
"ne protège pas contre de telles erreurs, assurez-vous de prendre les mesures "
|
|
|
|
|
"nécessaires en production. De plus, cette méthode ne fonctionnera que si "
|
2020-02-05 22:32:21 +00:00
|
|
|
|
"l'archive tient en mémoire ::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:236
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid "Specifying the Interpreter"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Spécification de l'interprète"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:238
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Note that if you specify an interpreter and then distribute your application "
|
|
|
|
|
"archive, you need to ensure that the interpreter used is portable. The "
|
|
|
|
|
"Python launcher for Windows supports most common forms of POSIX ``#!`` line, "
|
|
|
|
|
"but there are other issues to consider:"
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Notez que si vous spécifiez un interpréteur et que vous distribuez ensuite "
|
|
|
|
|
"votre archive d'application, vous devez vous assurer que l'interpréteur "
|
|
|
|
|
"utilisé est portable. Le lanceur Python pour Windows gère la plupart des "
|
|
|
|
|
"formes courantes de la ligne POSIX ``#!``, mais il y a d'autres problèmes à "
|
|
|
|
|
"considérer :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:243
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If you use \"/usr/bin/env python\" (or other forms of the \"python\" "
|
|
|
|
|
"command, such as \"/usr/bin/python\"), you need to consider that your users "
|
|
|
|
|
"may have either Python 2 or Python 3 as their default, and write your code "
|
|
|
|
|
"to work under both versions."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si vous utilisez ``/usr/bin/env python`` (ou d'autres formes de la commande "
|
|
|
|
|
"*python*, comme ``/usr/bin/python``), vous devez considérer que vos "
|
|
|
|
|
"utilisateurs peuvent avoir Python 2 ou Python 3 par défaut, et écrire votre "
|
|
|
|
|
"code pour fonctionner dans les deux versions."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:247
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If you use an explicit version, for example \"/usr/bin/env python3\" your "
|
|
|
|
|
"application will not work for users who do not have that version. (This may "
|
|
|
|
|
"be what you want if you have not made your code Python 2 compatible)."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si vous utilisez une version explicite, par exemple ``/usr/bin/env python3`` "
|
|
|
|
|
"votre application ne fonctionnera pas pour les utilisateurs qui n'ont pas "
|
|
|
|
|
"cette version. (C'est peut-être ce que vous voulez si vous n'avez pas rendu "
|
|
|
|
|
"votre code compatible Python 2)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:250
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"There is no way to say \"python X.Y or later\", so be careful of using an "
|
|
|
|
|
"exact version like \"/usr/bin/env python3.4\" as you will need to change "
|
|
|
|
|
"your shebang line for users of Python 3.5, for example."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Il n'y a aucun moyen de dire « python X.Y ou supérieur » donc faites "
|
|
|
|
|
"attention si vous utilisez une version exacte comme ``/usr/bin/env "
|
|
|
|
|
"python3.4`` car vous devrez changer votre ligne *shebang* pour les "
|
|
|
|
|
"utilisateurs de Python 3.5, par exemple."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:254
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Typically, you should use an \"/usr/bin/env python2\" or \"/usr/bin/env "
|
|
|
|
|
"python3\", depending on whether your code is written for Python 2 or 3."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Normalement, vous devriez utiliser un ``/usr/bin/env python2`` ou ``/usr/bin/"
|
|
|
|
|
"env python3``, selon que votre code soit écrit pour Python 2 ou 3."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:259
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid "Creating Standalone Applications with zipapp"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Création d'applications autonomes avec *zipapp*"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:261
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Using the :mod:`zipapp` module, it is possible to create self-contained "
|
|
|
|
|
"Python programs, which can be distributed to end users who only need to have "
|
|
|
|
|
"a suitable version of Python installed on their system. The key to doing "
|
|
|
|
|
"this is to bundle all of the application's dependencies into the archive, "
|
|
|
|
|
"along with the application code."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"En utilisant le module :mod:`zipapp`, il est possible de créer des "
|
|
|
|
|
"programmes Python qui peuvent être distribués à des utilisateurs finaux dont "
|
|
|
|
|
"le seul pré-requis est d'avoir la bonne version de Python installée sur leur "
|
|
|
|
|
"ordinateur. Pour y arriver, la clé est de regrouper toutes les dépendances "
|
|
|
|
|
"de l'application dans l'archive avec le code source de l'application."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:267
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid "The steps to create a standalone archive are as follows:"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Les étapes pour créer une archive autonome sont les suivantes :"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:269
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Create your application in a directory as normal, so you have a ``myapp`` "
|
|
|
|
|
"directory containing a ``__main__.py`` file, and any supporting application "
|
|
|
|
|
"code."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Créez votre application dans un répertoire comme d'habitude, de manière à "
|
|
|
|
|
"avoir un répertoire ``myapp`` contenant un fichier ``__main__.py`` et tout "
|
|
|
|
|
"le code de l'application correspondante."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:273
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Install all of your application's dependencies into the ``myapp`` directory, "
|
|
|
|
|
"using pip:"
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Installez toutes les dépendances de votre application dans le répertoire "
|
|
|
|
|
"``myapp`` en utilisant *pip* :"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:280
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"(this assumes you have your project requirements in a ``requirements.txt`` "
|
|
|
|
|
"file - if not, you can just list the dependencies manually on the pip "
|
|
|
|
|
"command line)."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"(ceci suppose que vous ayez vos dépendances de projet dans un fichier "
|
|
|
|
|
"``requirements.txt`` — sinon vous pouvez simplement lister les dépendances "
|
|
|
|
|
"manuellement sur la ligne de commande *pip*)."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:284
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Optionally, delete the ``.dist-info`` directories created by pip in the "
|
|
|
|
|
"``myapp`` directory. These hold metadata for pip to manage the packages, and "
|
|
|
|
|
"as you won't be making any further use of pip they aren't required - "
|
|
|
|
|
"although it won't do any harm if you leave them."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si nécessaire, supprimez les répertoires ``.dist-info`` créés par *pip* dans "
|
|
|
|
|
"le répertoire ``myapp``. Ceux-ci contiennent des métadonnées pour *pip* afin "
|
|
|
|
|
"de gérer les paquets et, comme vous n'utiliserez plus *pip*, ils ne sont "
|
|
|
|
|
"pas nécessaires (c'est sans conséquence si vous les laissez)."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:289
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid "Package the application using:"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Regroupez le tout à l'aide de :"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:295
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"This will produce a standalone executable, which can be run on any machine "
|
|
|
|
|
"with the appropriate interpreter available. See :ref:`zipapp-specifying-the-"
|
|
|
|
|
"interpreter` for details. It can be shipped to users as a single file."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Cela produira un exécutable autonome qui peut être exécuté sur n'importe "
|
|
|
|
|
"quelle machine avec l'interpréteur approprié disponible. Voir :ref:`zipapp-"
|
|
|
|
|
"specifying-the-interpreter` pour plus de détails. Il peut être envoyé aux "
|
|
|
|
|
"utilisateurs sous la forme d'un seul fichier."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:299
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"On Unix, the ``myapp.pyz`` file is executable as it stands. You can rename "
|
|
|
|
|
"the file to remove the ``.pyz`` extension if you prefer a \"plain\" command "
|
|
|
|
|
"name. On Windows, the ``myapp.pyz[w]`` file is executable by virtue of the "
|
|
|
|
|
"fact that the Python interpreter registers the ``.pyz`` and ``.pyzw`` file "
|
|
|
|
|
"extensions when installed."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Sous Unix, le fichier ``myapp.pyz`` est exécutable tel quel. Vous pouvez "
|
|
|
|
|
"renommer le fichier pour supprimer l'extension ``.pyz`` si vous préférez un "
|
|
|
|
|
"nom de commande « simple ». Sous Windows, le fichier ``myapp.pyz[w]`` est "
|
|
|
|
|
"exécutable en vertu du fait que l'interpréteur Python est associé aux "
|
|
|
|
|
"extensions de fichier ``.pyz`` et ``.pyzw`` une fois installé."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:307
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid "Making a Windows executable"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Création d'un exécutable Windows"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:309
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"On Windows, registration of the ``.pyz`` extension is optional, and "
|
|
|
|
|
"furthermore, there are certain places that don't recognise registered "
|
|
|
|
|
"extensions \"transparently\" (the simplest example is that ``subprocess."
|
|
|
|
|
"run(['myapp'])`` won't find your application - you need to explicitly "
|
|
|
|
|
"specify the extension)."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Sous Windows, l'association de Python à l'extension ``.pyz`` est facultative "
|
|
|
|
|
"et, de plus, il y a certains mécanismes qui ne reconnaissent pas les "
|
|
|
|
|
"extensions enregistrées de manière « transparente » (l'exemple le plus "
|
|
|
|
|
"simple est que ``subprocess.run(['myapp'])`` ne trouvera pas votre "
|
|
|
|
|
"application — vous devez explicitement spécifier l'extension)."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:315
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"On Windows, therefore, it is often preferable to create an executable from "
|
|
|
|
|
"the zipapp. This is relatively easy, although it does require a C "
|
|
|
|
|
"compiler. The basic approach relies on the fact that zipfiles can have "
|
|
|
|
|
"arbitrary data prepended, and Windows exe files can have arbitrary data "
|
|
|
|
|
"appended. So by creating a suitable launcher and tacking the ``.pyz`` file "
|
|
|
|
|
"onto the end of it, you end up with a single-file executable that runs your "
|
|
|
|
|
"application."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Sous Windows, il est donc souvent préférable de créer un exécutable à partir "
|
|
|
|
|
"du *zipapp*. C'est relativement facile bien que cela nécessite un "
|
|
|
|
|
"compilateur C. L'astuce repose sur le fait que les fichiers zip peuvent "
|
|
|
|
|
"avoir des données arbitraires au début et les fichiers *exe* de Windows "
|
|
|
|
|
"peuvent avoir des données arbitraires à la fin. Ainsi, en créant un lanceur "
|
|
|
|
|
"approprié et en rajoutant le fichier ``.pyz`` à sa fin, vous obtenez un "
|
|
|
|
|
"fichier unique qui exécute votre application."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:322
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid "A suitable launcher can be as simple as the following::"
|
2020-02-05 22:32:21 +00:00
|
|
|
|
msgstr "Un lanceur approprié peut être aussi simple que ce qui suit ::"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:347
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If you define the ``WINDOWS`` preprocessor symbol, this will generate a GUI "
|
|
|
|
|
"executable, and without it, a console executable."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si vous définissez le symbole du préprocesseur ``WINDOWS`` cela va générer "
|
|
|
|
|
"un exécutable IUG, et sans lui, un exécutable console."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:350
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"To compile the executable, you can either just use the standard MSVC command "
|
|
|
|
|
"line tools, or you can take advantage of the fact that distutils knows how "
|
|
|
|
|
"to compile Python source::"
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Pour compiler l'exécutable, vous pouvez soit simplement utiliser les outils "
|
|
|
|
|
"standards en ligne de commande *MSVC*, soit profiter du fait que *distutils* "
|
2020-02-05 22:32:21 +00:00
|
|
|
|
"sait comment compiler les sources Python ::"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:377
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The resulting launcher uses the \"Limited ABI\", so it will run unchanged "
|
|
|
|
|
"with any version of Python 3.x. All it needs is for Python (``python3."
|
|
|
|
|
"dll``) to be on the user's ``PATH``."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Le lanceur résultant utilise le « Limited ABI » donc il fonctionnera sans "
|
|
|
|
|
"changement avec n'importe quelle version de Python 3.x. Tout ce dont il a "
|
|
|
|
|
"besoin est que Python (``python3.dll``) soit sur le ``PATH`` de "
|
|
|
|
|
"l'utilisateur."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:381
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"For a fully standalone distribution, you can distribute the launcher with "
|
|
|
|
|
"your application appended, bundled with the Python \"embedded\" "
|
|
|
|
|
"distribution. This will run on any PC with the appropriate architecture (32 "
|
|
|
|
|
"bit or 64 bit)."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Pour une distribution entièrement autonome vous pouvez distribuer le lanceur "
|
|
|
|
|
"avec votre application en fin de fichier, empaqueté avec la distribution "
|
|
|
|
|
"*embedded* Python. Ceci fonctionnera sur n'importe quel ordinateur avec "
|
|
|
|
|
"l'architecture appropriée (32 bits ou 64 bits)."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:387
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid "Caveats"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Mises en garde"
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:389
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"There are some limitations to the process of bundling your application into "
|
|
|
|
|
"a single file. In most, if not all, cases they can be addressed without "
|
|
|
|
|
"needing major changes to your application."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Il y a certaines limites à l'empaquetage de votre application dans un seul "
|
|
|
|
|
"fichier. Dans la plupart des cas, si ce n'est tous, elles peuvent être "
|
|
|
|
|
"traitées sans qu'il soit nécessaire d'apporter de modifications majeures à "
|
|
|
|
|
"votre application."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:393
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If your application depends on a package that includes a C extension, that "
|
|
|
|
|
"package cannot be run from a zip file (this is an OS limitation, as "
|
|
|
|
|
"executable code must be present in the filesystem for the OS loader to load "
|
|
|
|
|
"it). In this case, you can exclude that dependency from the zipfile, and "
|
|
|
|
|
"either require your users to have it installed, or ship it alongside your "
|
|
|
|
|
"zipfile and add code to your ``__main__.py`` to include the directory "
|
|
|
|
|
"containing the unzipped module in ``sys.path``. In this case, you will need "
|
|
|
|
|
"to make sure to ship appropriate binaries for your target architecture(s) "
|
|
|
|
|
"(and potentially pick the correct version to add to ``sys.path`` at runtime, "
|
|
|
|
|
"based on the user's machine)."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si votre application dépend d'un paquet qui inclut une extension C, ce "
|
|
|
|
|
"paquet ne peut pas être exécuté à partir d'un fichier zip (c'est une "
|
|
|
|
|
"limitation du système d'exploitation, car le code exécutable doit être "
|
|
|
|
|
"présent dans le système de fichiers pour que le lanceur de l'OS puisse le "
|
|
|
|
|
"charger). Dans ce cas, vous pouvez exclure cette dépendance du fichier zip "
|
|
|
|
|
"et, soit demander à vos utilisateurs de l'installer, soit la fournir avec "
|
|
|
|
|
"votre fichier zip et ajouter du code à votre fichier ``__main__.py`` pour "
|
|
|
|
|
"inclure le répertoire contenant le module décompressé dans ``sys.path``. "
|
|
|
|
|
"Dans ce cas, vous devrez vous assurer d'envoyer les binaires appropriés pour "
|
|
|
|
|
"votre ou vos architecture(s) cible(s) (et éventuellement choisir la bonne "
|
|
|
|
|
"version à ajouter à ``sys.path`` au moment de l'exécution, basée sur la "
|
|
|
|
|
"machine de l'utilisateur)."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:403
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If you are shipping a Windows executable as described above, you either need "
|
|
|
|
|
"to ensure that your users have ``python3.dll`` on their PATH (which is not "
|
|
|
|
|
"the default behaviour of the installer) or you should bundle your "
|
|
|
|
|
"application with the embedded distribution."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si vous livrez un exécutable Windows comme décrit ci-dessus, vous devez vous "
|
|
|
|
|
"assurer que vos utilisateurs ont ``python3.dll`` sur leur PATH (ce qui n'est "
|
|
|
|
|
"pas le comportement par défaut de l'installateur) ou vous devez inclure la "
|
|
|
|
|
"distribution intégrée dans votre application."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:408
|
2018-03-23 08:57:03 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The suggested launcher above uses the Python embedding API. This means that "
|
|
|
|
|
"in your application, ``sys.executable`` will be your application, and *not* "
|
|
|
|
|
"a conventional Python interpreter. Your code and its dependencies need to "
|
|
|
|
|
"be prepared for this possibility. For example, if your application uses "
|
|
|
|
|
"the :mod:`multiprocessing` module, it will need to call :func:"
|
|
|
|
|
"`multiprocessing.set_executable` to let the module know where to find the "
|
|
|
|
|
"standard Python interpreter."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Le lanceur suggéré ci-dessus utilise l'API d'intégration Python. Cela "
|
|
|
|
|
"signifie que dans votre application ``sys.executable`` sera votre "
|
|
|
|
|
"application et *pas* un interpréteur Python classique. Votre code et ses "
|
|
|
|
|
"dépendances doivent être préparés à cette possibilité. Par exemple, si "
|
|
|
|
|
"votre application utilise le module :mod:`multiprocessing`, elle devra "
|
|
|
|
|
"appeler :func:`multiprocessing.set_executable` pour que le module sache où "
|
|
|
|
|
"trouver l'interpréteur Python standard."
|
2018-03-23 08:57:03 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:418
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "The Python Zip Application Archive Format"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Le format d'archive d'application Zip Python"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:420
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Python has been able to execute zip files which contain a ``__main__.py`` "
|
|
|
|
|
"file since version 2.6. In order to be executed by Python, an application "
|
|
|
|
|
"archive simply has to be a standard zip file containing a ``__main__.py`` "
|
|
|
|
|
"file which will be run as the entry point for the application. As usual for "
|
|
|
|
|
"any Python script, the parent of the script (in this case the zip file) will "
|
|
|
|
|
"be placed on :data:`sys.path` and thus further modules can be imported from "
|
|
|
|
|
"the zip file."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Python est capable d'exécuter des fichiers zip qui contiennent un fichier "
|
|
|
|
|
"``__main__.py`` depuis la version 2.6. Pour être exécutée par Python, une "
|
|
|
|
|
"archive d'application doit simplement être un fichier zip standard contenant "
|
|
|
|
|
"un fichier ``__main__.py`` qui sera exécuté comme point d'entrée de "
|
|
|
|
|
"l'application. Comme d'habitude pour tout script Python, le parent du "
|
|
|
|
|
"script (dans ce cas le fichier zip) sera placé sur :data:`sys.path` et ainsi "
|
|
|
|
|
"d'autres modules pourront être importés depuis le fichier zip."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:427
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"The zip file format allows arbitrary data to be prepended to a zip file. "
|
|
|
|
|
"The zip application format uses this ability to prepend a standard POSIX "
|
|
|
|
|
"\"shebang\" line to the file (``#!/path/to/interpreter``)."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Le format de fichier zip permet d'ajouter des données arbitraires à un "
|
|
|
|
|
"fichier zip. Le format de l'application zip utilise cette possibilité pour "
|
|
|
|
|
"préfixer une ligne *shebang* POSIX standard dans le fichier (``#!/path/to/"
|
|
|
|
|
"interpreter``)."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:431
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Formally, the Python zip application format is therefore:"
|
2019-08-20 10:12:29 +00:00
|
|
|
|
msgstr "Formellement, le format d'application zip de Python est donc :"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:433
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"An optional shebang line, containing the characters ``b'#!'`` followed by an "
|
|
|
|
|
"interpreter name, and then a newline (``b'\\n'``) character. The "
|
|
|
|
|
"interpreter name can be anything acceptable to the OS \"shebang\" "
|
|
|
|
|
"processing, or the Python launcher on Windows. The interpreter should be "
|
|
|
|
|
"encoded in UTF-8 on Windows, and in :func:`sys.getfilesystemencoding()` on "
|
|
|
|
|
"POSIX."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Une ligne *shebang* facultative, contenant les caractères ``b'#!`` suivis "
|
|
|
|
|
"d'un nom d’interpréteur, puis un caractère fin de ligne (``b'\\n'``). Le "
|
|
|
|
|
"nom de l'interpréteur peut être n'importe quoi acceptable pour le traitement "
|
|
|
|
|
"*shebang* de l'OS, ou le lanceur Python sous Windows. L'interpréteur doit "
|
|
|
|
|
"être encodé en UTF-8 sous Windows, et en :func:`sys.getfilesystemencoding()` "
|
|
|
|
|
"sur POSIX."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:438
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"Standard zipfile data, as generated by the :mod:`zipfile` module. The "
|
|
|
|
|
"zipfile content *must* include a file called ``__main__.py`` (which must be "
|
|
|
|
|
"in the \"root\" of the zipfile - i.e., it cannot be in a subdirectory). The "
|
|
|
|
|
"zipfile data can be compressed or uncompressed."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Des données *zipfile* standards, telles que générées par le module :mod:"
|
|
|
|
|
"`zipfile`. Le contenu du fichier zip *doit* inclure un fichier appelé "
|
|
|
|
|
"``__main__.py`` (qui doit se trouver à la racine du fichier zip — c'est-à-"
|
|
|
|
|
"dire qu'il ne peut se trouver dans un sous-répertoire). Les données du "
|
|
|
|
|
"fichier zip peuvent être compressées ou non."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:443
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"If an application archive has a shebang line, it may have the executable bit "
|
|
|
|
|
"set on POSIX systems, to allow it to be executed directly."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Si une archive d'application a une ligne *shebang*, elle peut avoir le bit "
|
|
|
|
|
"exécutable activé sur les systèmes POSIX, pour lui permettre d'être exécutée "
|
|
|
|
|
"directement."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
|
#: ../Doc/library/zipapp.rst:446
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
|
|
|
|
"There is no requirement that the tools in this module are used to create "
|
|
|
|
|
"application archives - the module is a convenience, but archives in the "
|
|
|
|
|
"above format created by any means are acceptable to Python."
|
|
|
|
|
msgstr ""
|
2019-08-20 10:12:29 +00:00
|
|
|
|
"Vous pouvez créer des archives d'applications sans utiliser les outils de ce "
|
|
|
|
|
"module — le module existe pour faciliter les choses, mais les archives, "
|
|
|
|
|
"créées par n'importe quel moyen tout en respectant le format ci-dessus, sont "
|
|
|
|
|
"valides pour Python."
|