python-docs-fr/distutils/examples.po

290 lines
9.4 KiB
Plaintext
Raw Normal View History

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"
2020-09-11 07:11:46 +00:00
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
"PO-Revision-Date: 2020-02-04 21:20+0100\n"
2020-02-14 10:18:53 +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"
"X-Generator: Poedit 2.2.4\n"
2016-10-30 09:46:26 +00:00
#: distutils/examples.rst:5
2019-10-09 16:10:12 +00:00
#, fuzzy
msgid "Distutils Examples"
2016-10-30 09:46:26 +00:00
msgstr "Exemples"
#: distutils/_setuptools_disclaimer.rst:3
2019-09-04 09:35:23 +00:00
msgid ""
"This document is being retained solely until the ``setuptools`` "
"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html "
"independently covers all of the relevant information currently included here."
msgstr ""
"Cette page est conservée uniquement jusqu'à ce que la documentation "
"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools."
"html couvre de manière indépendante toutes les informations pertinentes "
"actuellement incluses ici."
2019-09-04 09:35:23 +00:00
#: distutils/examples.rst:9
2016-10-30 09:46:26 +00:00
msgid ""
"This chapter provides a number of basic examples to help get started with "
"distutils. Additional information about using distutils can be found in the "
"Distutils Cookbook."
msgstr ""
#: distutils/examples.rst:16
2016-10-30 09:46:26 +00:00
msgid "`Distutils Cookbook <https://wiki.python.org/moin/Distutils/Cookbook>`_"
msgstr ""
#: distutils/examples.rst:17
2016-10-30 09:46:26 +00:00
msgid ""
"Collection of recipes showing how to achieve more control over distutils."
msgstr ""
#: distutils/examples.rst:23
2016-10-30 09:46:26 +00:00
msgid "Pure Python distribution (by module)"
msgstr ""
#: distutils/examples.rst:25
2016-10-30 09:46:26 +00:00
msgid ""
"If you're just distributing a couple of modules, especially if they don't "
"live in a particular package, you can specify them individually using the "
"``py_modules`` option in the setup script."
msgstr ""
#: distutils/examples.rst:29
2016-10-30 09:46:26 +00:00
msgid ""
"In the simplest case, you'll have two files to worry about: a setup script "
"and the single module you're distributing, :file:`foo.py` in this example::"
msgstr ""
#: distutils/examples.rst:36
2016-10-30 09:46:26 +00:00
msgid ""
"(In all diagrams in this section, *<root>* will refer to the distribution "
"root directory.) A minimal setup script to describe this situation would "
"be::"
msgstr ""
#: distutils/examples.rst:45
2016-10-30 09:46:26 +00:00
msgid ""
"Note that the name of the distribution is specified independently with the "
"``name`` option, and there's no rule that says it has to be the same as the "
"name of the sole module in the distribution (although that's probably a good "
"convention to follow). However, the distribution name is used to generate "
"filenames, so you should stick to letters, digits, underscores, and hyphens."
msgstr ""
#: distutils/examples.rst:51
2016-10-30 09:46:26 +00:00
msgid ""
"Since ``py_modules`` is a list, you can of course specify multiple modules, "
"eg. if you're distributing modules :mod:`foo` and :mod:`bar`, your setup "
"might look like this::"
msgstr ""
#: distutils/examples.rst:60
2016-10-30 09:46:26 +00:00
msgid "and the setup script might be ::"
msgstr ""
#: distutils/examples.rst:68
2016-10-30 09:46:26 +00:00
msgid ""
"You can put module source files into another directory, but if you have "
"enough modules to do that, it's probably easier to specify modules by "
"package rather than listing them individually."
msgstr ""
#: distutils/examples.rst:76
2016-10-30 09:46:26 +00:00
msgid "Pure Python distribution (by package)"
msgstr ""
#: distutils/examples.rst:78
2016-10-30 09:46:26 +00:00
msgid ""
"If you have more than a couple of modules to distribute, especially if they "
"are in multiple packages, it's probably easier to specify whole packages "
"rather than individual modules. This works even if your modules are not in "
"a package; you can just tell the Distutils to process modules from the root "
"package, and that works the same as any other package (except that you don't "
"have to have an :file:`__init__.py` file)."
msgstr ""
#: distutils/examples.rst:85
2016-10-30 09:46:26 +00:00
msgid "The setup script from the last example could also be written as ::"
msgstr ""
#: distutils/examples.rst:93
2016-10-30 09:46:26 +00:00
msgid "(The empty string stands for the root package.)"
msgstr ""
#: distutils/examples.rst:95
2016-10-30 09:46:26 +00:00
msgid ""
"If those two files are moved into a subdirectory, but remain in the root "
"package, e.g.::"
msgstr ""
#: distutils/examples.rst:103
2016-10-30 09:46:26 +00:00
msgid ""
"then you would still specify the root package, but you have to tell the "
"Distutils where source files in the root package live::"
msgstr ""
#: distutils/examples.rst:113
2016-10-30 09:46:26 +00:00
msgid ""
"More typically, though, you will want to distribute multiple modules in the "
"same package (or in sub-packages). For example, if the :mod:`foo` and :mod:"
"`bar` modules belong in package :mod:`foobar`, one way to layout your source "
"tree is ::"
msgstr ""
#: distutils/examples.rst:125
2016-10-30 09:46:26 +00:00
msgid ""
"This is in fact the default layout expected by the Distutils, and the one "
"that requires the least work to describe in your setup script::"
msgstr ""
#: distutils/examples.rst:134
2016-10-30 09:46:26 +00:00
msgid ""
"If you want to put modules in directories not named for their package, then "
"you need to use the ``package_dir`` option again. For example, if the :file:"
"`src` directory holds modules in the :mod:`foobar` package::"
msgstr ""
#: distutils/examples.rst:145
2016-10-30 09:46:26 +00:00
msgid "an appropriate setup script would be ::"
msgstr ""
#: distutils/examples.rst:154
2016-10-30 09:46:26 +00:00
msgid ""
"Or, you might put modules from your main package right in the distribution "
"root::"
msgstr ""
#: distutils/examples.rst:163
2016-10-30 09:46:26 +00:00
msgid "in which case your setup script would be ::"
msgstr ""
#: distutils/examples.rst:172
2016-10-30 09:46:26 +00:00
msgid "(The empty string also stands for the current directory.)"
msgstr ""
#: distutils/examples.rst:174
2016-10-30 09:46:26 +00:00
msgid ""
"If you have sub-packages, they must be explicitly listed in ``packages``, "
"but any entries in ``package_dir`` automatically extend to sub-packages. (In "
"other words, the Distutils does *not* scan your source tree, trying to "
"figure out which directories correspond to Python packages by looking for :"
"file:`__init__.py` files.) Thus, if the default layout grows a sub-package::"
msgstr ""
#: distutils/examples.rst:190
2016-10-30 09:46:26 +00:00
msgid "then the corresponding setup script would be ::"
msgstr ""
#: distutils/examples.rst:202
2016-10-30 09:46:26 +00:00
msgid "Single extension module"
msgstr ""
#: distutils/examples.rst:204
2016-10-30 09:46:26 +00:00
msgid ""
"Extension modules are specified using the ``ext_modules`` option. "
"``package_dir`` has no effect on where extension source files are found; it "
"only affects the source for pure Python modules. The simplest case, a "
"single extension module in a single C source file, is::"
msgstr ""
#: distutils/examples.rst:213
2016-10-30 09:46:26 +00:00
msgid ""
"If the :mod:`foo` extension belongs in the root package, the setup script "
"for this could be ::"
msgstr ""
#: distutils/examples.rst:223
2016-10-30 09:46:26 +00:00
msgid "If the extension actually belongs in a package, say :mod:`foopkg`, then"
msgstr ""
#: distutils/examples.rst:225
2016-10-30 09:46:26 +00:00
msgid ""
"With exactly the same source tree layout, this extension can be put in the :"
"mod:`foopkg` package simply by changing the name of the extension::"
msgstr ""
#: distutils/examples.rst:236
2016-10-30 09:46:26 +00:00
msgid "Checking a package"
msgstr ""
#: distutils/examples.rst:238
2016-10-30 09:46:26 +00:00
msgid ""
"The ``check`` command allows you to verify if your package meta-data meet "
"the minimum requirements to build a distribution."
msgstr ""
#: distutils/examples.rst:241
2016-10-30 09:46:26 +00:00
msgid ""
"To run it, just call it using your :file:`setup.py` script. If something is "
"missing, ``check`` will display a warning."
msgstr ""
#: distutils/examples.rst:244
2016-10-30 09:46:26 +00:00
msgid "Let's take an example with a simple script::"
msgstr ""
#: distutils/examples.rst:250
2016-10-30 09:46:26 +00:00
msgid "Running the ``check`` command will display some warnings:"
msgstr ""
#: distutils/examples.rst:261
2016-10-30 09:46:26 +00:00
msgid ""
"If you use the reStructuredText syntax in the ``long_description`` field and "
"`docutils`_ is installed you can check if the syntax is fine with the "
"``check`` command, using the ``restructuredtext`` option."
msgstr ""
#: distutils/examples.rst:265
2016-10-30 09:46:26 +00:00
msgid "For example, if the :file:`setup.py` script is changed like this::"
msgstr ""
#: distutils/examples.rst:280
2016-10-30 09:46:26 +00:00
msgid ""
"Where the long description is broken, ``check`` will be able to detect it by "
"using the :mod:`docutils` parser:"
msgstr ""
#: distutils/examples.rst:291
2016-10-30 09:46:26 +00:00
msgid "Reading the metadata"
msgstr ""
#: distutils/examples.rst:293
2016-10-30 09:46:26 +00:00
msgid ""
"The :func:`distutils.core.setup` function provides a command-line interface "
"that allows you to query the metadata fields of a project through the "
"``setup.py`` script of a given project:"
msgstr ""
#: distutils/examples.rst:302
2016-10-30 09:46:26 +00:00
msgid ""
"This call reads the ``name`` metadata by running the :func:`distutils.core."
"setup` function. Although, when a source or binary distribution is created "
"with Distutils, the metadata fields are written in a static file called :"
"file:`PKG-INFO`. When a Distutils-based project is installed in Python, the :"
"file:`PKG-INFO` file is copied alongside the modules and packages of the "
"distribution under :file:`NAME-VERSION-pyX.X.egg-info`, where ``NAME`` is "
"the name of the project, ``VERSION`` its version as defined in the Metadata, "
"and ``pyX.X`` the major and minor version of Python like ``2.7`` or ``3.2``."
msgstr ""
#: distutils/examples.rst:312
2016-10-30 09:46:26 +00:00
msgid ""
"You can read back this static file, by using the :class:`distutils.dist."
"DistributionMetadata` class and its :func:`read_pkg_file` method::"
msgstr ""
#: distutils/examples.rst:326
2016-10-30 09:46:26 +00:00
msgid ""
2017-04-02 20:14:06 +00:00
"Notice that the class can also be instantiated with a metadata file path to "
2016-10-30 09:46:26 +00:00
"loads its values::"
msgstr ""