2016-10-17 19:42:06 +00:00
|
|
|
# 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.6\n"
|
|
|
|
"Report-Msgid-Bugs-To: \n"
|
|
|
|
"POT-Creation-Date: 2016-10-17 21:44+0200\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/distutils/apiref.rst:5
|
|
|
|
msgid "API Reference"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Référence de l'API"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:9
|
|
|
|
msgid ":mod:`distutils.core` --- Core Distutils functionality"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:15
|
|
|
|
msgid ""
|
|
|
|
"The :mod:`distutils.core` module is the only module that needs to be "
|
|
|
|
"installed to use the Distutils. It provides the :func:`setup` (which is "
|
|
|
|
"called from the setup script). Indirectly provides the :class:`distutils."
|
|
|
|
"dist.Distribution` and :class:`distutils.cmd.Command` class."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"Le module :mod:`distutils.core` est le seul module qui a besoin d'être "
|
|
|
|
"installé pour utiliser Distutils. Il fournit le :func:`setup` (qui est "
|
|
|
|
"appelé par le script de setup). Il fournit indirectement les classes :class:"
|
|
|
|
"`distutils.dist.Distribution` et :class:`distutils.cmd.Command`."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:23
|
|
|
|
msgid ""
|
|
|
|
"The basic do-everything function that does most everything you could ever "
|
|
|
|
"ask for from a Distutils method."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"La fonction de base à tout faire qui fait presque tout ce dont vous pourriez "
|
|
|
|
"attendre d'une méthode Distutils."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:26
|
|
|
|
msgid ""
|
|
|
|
"The setup function takes a large number of arguments. These are laid out in "
|
|
|
|
"the following table."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"La fonction setup prend un grand nombre d'arguments. Ils sont présentés dans "
|
|
|
|
"le tableau suivant."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:32 ../Doc/distutils/apiref.rst:175
|
|
|
|
msgid "argument name"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "nom de l'argument"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:32 ../Doc/distutils/apiref.rst:133
|
|
|
|
#: ../Doc/distutils/apiref.rst:175
|
|
|
|
msgid "value"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "valeur"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:32 ../Doc/distutils/apiref.rst:175
|
|
|
|
msgid "type"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "type"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:34 ../Doc/distutils/apiref.rst:177
|
|
|
|
msgid "*name*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*name*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:34
|
|
|
|
msgid "The name of the package"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Le nom du paquet"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:34 ../Doc/distutils/apiref.rst:36
|
|
|
|
#: ../Doc/distutils/apiref.rst:40 ../Doc/distutils/apiref.rst:43
|
|
|
|
#: ../Doc/distutils/apiref.rst:46 ../Doc/distutils/apiref.rst:48
|
|
|
|
#: ../Doc/distutils/apiref.rst:51 ../Doc/distutils/apiref.rst:58
|
|
|
|
#: ../Doc/distutils/apiref.rst:62 ../Doc/distutils/apiref.rst:65
|
|
|
|
#: ../Doc/distutils/apiref.rst:86 ../Doc/distutils/apiref.rst:96
|
|
|
|
#: ../Doc/distutils/apiref.rst:177 ../Doc/distutils/apiref.rst:267
|
|
|
|
msgid "a string"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "une chaîne de caractères"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:36
|
|
|
|
msgid "*version*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*version*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:36
|
|
|
|
msgid "The version number of the package; see :mod:`distutils.version`"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Le numéro de version du paquet, voir :mod:`distutils.version`"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:40
|
|
|
|
msgid "*description*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*description*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:40
|
|
|
|
msgid "A single line describing the package"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une ligne unique décrivant le paquet"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:43
|
|
|
|
msgid "*long_description*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*long_description*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:43
|
|
|
|
msgid "Longer description of the package"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une description plus longue du paquet"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:46
|
|
|
|
msgid "*author*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*author*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:46
|
|
|
|
msgid "The name of the package author"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Le nom de l'auteur du paquet"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:48
|
|
|
|
msgid "*author_email*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*author_email*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:48
|
|
|
|
msgid "The email address of the package author"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "L'adresse e-mail de l'auteur du paquet"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:51
|
|
|
|
msgid "*maintainer*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*maintainer*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:51
|
|
|
|
msgid ""
|
|
|
|
"The name of the current maintainer, if different from the author. Note that "
|
|
|
|
"if the maintainer is provided, distutils will use it as the author in :file:"
|
|
|
|
"`PKG-INFO`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:58
|
|
|
|
msgid "*maintainer_email*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*maintainer_email*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:58
|
|
|
|
msgid ""
|
|
|
|
"The email address of the current maintainer, if different from the author"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "L'adresse email de l'actuel mainteneur, si différent de l'auteur"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:62
|
|
|
|
msgid "*url*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*url*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:62
|
|
|
|
msgid "A URL for the package (homepage)"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une URL pour le paquet (page d'accueil)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:65
|
|
|
|
msgid "*download_url*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*download_url*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:65
|
|
|
|
msgid "A URL to download the package"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une URL pour télécharger le paquet"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:67
|
|
|
|
msgid "*packages*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*packages*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:67
|
|
|
|
msgid "A list of Python packages that distutils will manipulate"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une liste des paquets Python que distutils va manipuler"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:67 ../Doc/distutils/apiref.rst:70
|
|
|
|
#: ../Doc/distutils/apiref.rst:73 ../Doc/distutils/apiref.rst:90
|
|
|
|
#: ../Doc/distutils/apiref.rst:183 ../Doc/distutils/apiref.rst:196
|
|
|
|
#: ../Doc/distutils/apiref.rst:212 ../Doc/distutils/apiref.rst:215
|
|
|
|
#: ../Doc/distutils/apiref.rst:219 ../Doc/distutils/apiref.rst:223
|
|
|
|
#: ../Doc/distutils/apiref.rst:229 ../Doc/distutils/apiref.rst:236
|
|
|
|
#: ../Doc/distutils/apiref.rst:247 ../Doc/distutils/apiref.rst:256
|
|
|
|
#: ../Doc/distutils/apiref.rst:264
|
|
|
|
msgid "a list of strings"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "une liste de chaînes"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:70
|
|
|
|
msgid "*py_modules*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*py_modules*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:70
|
|
|
|
msgid "A list of Python modules that distutils will manipulate"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une liste de modules Python que distutils va manipuler"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:73
|
|
|
|
msgid "*scripts*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*scripts*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:73
|
|
|
|
msgid "A list of standalone script files to be built and installed"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une liste de scripts autonomes à construire et à installer"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:77
|
|
|
|
msgid "*ext_modules*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*ext_modules*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:77
|
|
|
|
msgid "A list of Python extensions to be built"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une liste des extensions Python à construire"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:77
|
|
|
|
msgid "a list of instances of :class:`distutils.core.Extension`"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "une liste d'instances de :class:`distutils.core.Extension`"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:80
|
|
|
|
msgid "*classifiers*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*classifiers*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:80
|
|
|
|
msgid "A list of categories for the package"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une liste de catégories pour le paquet"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:80
|
|
|
|
msgid ""
|
|
|
|
"a list of strings; valid classifiers are listed on `PyPI <https://pypi."
|
|
|
|
"python.org/pypi?:action=list_classifiers>`_."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"une liste des chaines, les classifieurs valides est listés sur `PyPI "
|
|
|
|
"<https://pypi.python.org/pypi?:action=list_classifiers>`_."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:83
|
|
|
|
msgid "*distclass*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*distclass*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:83
|
|
|
|
msgid "the :class:`Distribution` class to use"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "la classe :class:`Distribution` à utiliser"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:83
|
|
|
|
msgid "a subclass of :class:`distutils.core.Distribution`"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "une sous classe de :class:`distutils.core.Distribution`"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:86
|
|
|
|
msgid "*script_name*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*script_name*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:86
|
|
|
|
msgid "The name of the setup.py script - defaults to ``sys.argv[0]``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:90
|
|
|
|
msgid "*script_args*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*script_args*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:90
|
|
|
|
msgid "Arguments to supply to the setup script"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Arguments à fournir au script d'installation"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:93
|
|
|
|
msgid "*options*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*options*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:93
|
|
|
|
msgid "default options for the setup script"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "options par défaut pour le script d'installation"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:93 ../Doc/distutils/apiref.rst:103
|
|
|
|
#: ../Doc/distutils/apiref.rst:109
|
|
|
|
msgid "a dictionary"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "un dictionnaire"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:96
|
|
|
|
msgid "*license*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*license*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:96
|
|
|
|
msgid "The license for the package"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "La licence pour le paquet"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:98
|
|
|
|
msgid "*keywords*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*keywords*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:98
|
|
|
|
msgid "Descriptive meta-data, see :pep:`314`"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Méta-données descriptives, voir :pep:`314`"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:98 ../Doc/distutils/apiref.rst:101
|
|
|
|
msgid "a list of strings or a comma-separated string"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:101
|
|
|
|
msgid "*platforms*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*platforms*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:103
|
|
|
|
msgid "*cmdclass*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*cmdclass*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:103
|
|
|
|
msgid "A mapping of command names to :class:`Command` subclasses"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Un mapping des noms de commandes et des sous-classes :class:`Command`"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:106
|
|
|
|
msgid "*data_files*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*data_files*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:106
|
|
|
|
msgid "A list of data files to install"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Une liste de fichiers de données à installer"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:106
|
|
|
|
msgid "a list"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "une liste"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:109
|
|
|
|
msgid "*package_dir*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*package_dir*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:109
|
|
|
|
msgid "A mapping of package to directory names"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Un mapping des paquets et des noms de dossiers"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:117
|
|
|
|
msgid ""
|
|
|
|
"Run a setup script in a somewhat controlled environment, and return the :"
|
|
|
|
"class:`distutils.dist.Distribution` instance that drives things. This is "
|
|
|
|
"useful if you need to find out the distribution meta-data (passed as "
|
|
|
|
"keyword args from *script* to :func:`setup`), or the contents of the config "
|
|
|
|
"files or command-line."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:123
|
|
|
|
msgid ""
|
|
|
|
"*script_name* is a file that will be read and run with :func:`exec`. ``sys."
|
|
|
|
"argv[0]`` will be replaced with *script* for the duration of the call. "
|
|
|
|
"*script_args* is a list of strings; if supplied, ``sys.argv[1:]`` will be "
|
|
|
|
"replaced by *script_args* for the duration of the call."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"*script_name* est un fichier qui sera lu et exécuté avec :func:`exec`. ``sys."
|
|
|
|
"argv[0]`` sera remplacé par *script* par la durée de l'appel. *script_args* "
|
|
|
|
"est une liste de chaînes; si fourni, ``sys.argv[1:]`` sera remplacé par "
|
|
|
|
"*script_args* pour la durée de l'appel."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:128
|
|
|
|
msgid ""
|
|
|
|
"*stop_after* tells :func:`setup` when to stop processing; possible values:"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*stop_after* dit à :func:`setup` quand s'arrêter; valeurs possibles:"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:133 ../Doc/distutils/apiref.rst:542
|
|
|
|
#: ../Doc/distutils/apiref.rst:1566
|
|
|
|
msgid "description"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "description"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:135
|
|
|
|
msgid "*init*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*init*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:135
|
|
|
|
msgid ""
|
|
|
|
"Stop after the :class:`Distribution` instance has been created and "
|
|
|
|
"populated with the keyword arguments to :func:`setup`"
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"S'arrête une fois que l'instance :class:`Distribution` a été créée et "
|
|
|
|
"renseignée avec les arguments-clés de :func:`setup`"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:139
|
|
|
|
msgid "*config*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*config*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:139
|
|
|
|
msgid ""
|
|
|
|
"Stop after config files have been parsed (and their data stored in the :"
|
|
|
|
"class:`Distribution` instance)"
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"S'arrête une fois que les fichiers de configuration ont été parcouru (et que "
|
|
|
|
"leurs données ont été stockées dans l'instance :class:`Distribution`)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:143
|
|
|
|
msgid "*commandline*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*commandline*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:143
|
|
|
|
msgid ""
|
|
|
|
"Stop after the command-line (``sys.argv[1:]`` or *script_args*) have been "
|
|
|
|
"parsed (and the data stored in the :class:`Distribution` instance.)"
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"S'arrête une fois que la ligne de commande (``sys.argv[1:]`` ou "
|
|
|
|
"*script_args*) a été parcouru (et les données stockées dans l'instance :"
|
|
|
|
"class:`Distribution`)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:148
|
|
|
|
msgid "*run*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*run*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:148
|
|
|
|
msgid ""
|
|
|
|
"Stop after all commands have been run (the same as if :func:`setup` had "
|
|
|
|
"been called in the usual way). This is the default value."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"S'arrête une fois que toutes les commandes ont été exécutées (comme si :func:"
|
|
|
|
"`setup` fût appelé de la manière habituelle). Ceci est la valeur par défaut."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:154
|
|
|
|
msgid ""
|
|
|
|
"In addition, the :mod:`distutils.core` module exposed a number of classes "
|
|
|
|
"that live elsewhere."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"De plus, le module :mod:`distutils.core` a exposé un nombre de classe qui "
|
|
|
|
"existent ailleurs."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:157
|
|
|
|
msgid ":class:`~distutils.extension.Extension` from :mod:`distutils.extension`"
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
":class:`~distutils.extension.Extension` du module :mod:`distutils.extension`"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:159
|
|
|
|
msgid ":class:`~distutils.cmd.Command` from :mod:`distutils.cmd`"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr ":class:`~distutils.cmd.Command` du module :mod:`distutils.cmd`"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:161
|
|
|
|
msgid ":class:`~distutils.dist.Distribution` from :mod:`distutils.dist`"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr ":class:`~distutils.dist.Distribution` du module :mod:`distutils.dist`"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:163
|
|
|
|
msgid ""
|
|
|
|
"A short description of each of these follows, but see the relevant module "
|
|
|
|
"for the full reference."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"Une courte description de chacune d'elle suit, mais consultez le module "
|
|
|
|
"concerné pour une référence complète."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:169
|
|
|
|
msgid ""
|
|
|
|
"The Extension class describes a single C or C++extension module in a setup "
|
|
|
|
"script. It accepts the following keyword arguments in its constructor:"
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"La classe *Extension* décrit un seul module d'extension C ou C++ dans un "
|
|
|
|
"script d'installation. Elle accepte dans son constructeur les arguments "
|
|
|
|
"nommés suivants:"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:177
|
|
|
|
msgid ""
|
|
|
|
"the full name of the extension, including any packages --- ie. *not* a "
|
|
|
|
"filename or pathname, but Python dotted name"
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"le nom complet de l'extension, incluant n'importe quel paquet --- c-à-d "
|
|
|
|
"*pas* un nom de fichier ou de chemin mais un nom Python séparé par des points"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:183
|
|
|
|
msgid "*sources*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*sources*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:183
|
|
|
|
msgid ""
|
|
|
|
"list of source filenames, relative to the distribution root (where the setup "
|
|
|
|
"script lives), in Unix form (slash- separated) for portability. Source files "
|
|
|
|
"may be C, C++, SWIG (.i), platform-specific resource files, or whatever else "
|
|
|
|
"is recognized by the :command:`build_ext` command as source for a Python "
|
|
|
|
"extension."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"listes des noms de fichier des sources, relatifs à la racine de la "
|
|
|
|
"distribution (où est placé le script setup), dans un format Unix (séparé par "
|
|
|
|
"des slashs) dans un souci de portabilité. Les fichiers de code source "
|
|
|
|
"peuvent être du C, C++, SWIG (.i), des fichiers de ressources spécifiques à "
|
|
|
|
"la plateforme ou tout autre reconnu par la commande :command:`build_ext` "
|
|
|
|
"comme source d'une extension Python"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:196
|
|
|
|
msgid "*include_dirs*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:196
|
|
|
|
msgid ""
|
|
|
|
"list of directories to search for C/C++ header files (in Unix form for "
|
|
|
|
"portability)"
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"liste des répertoires où chercher les fichiers d'entêtes C/C++ (en format "
|
|
|
|
"Unix dans un souci de portabilité)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:200
|
|
|
|
msgid "*define_macros*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*define_macros*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:200
|
|
|
|
msgid ""
|
|
|
|
"list of macros to define; each macro is defined using a 2-tuple ``(name, "
|
|
|
|
"value)``, where *value* is either the string to define it to or ``None`` to "
|
|
|
|
"define it without a particular value (equivalent of ``#define FOO`` in "
|
|
|
|
"source or :option:`-DFOO` on Unix C compiler command line)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:200
|
|
|
|
msgid "a list of tuples"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "une liste de tuples"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:212
|
|
|
|
msgid "*undef_macros*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*undef_macros*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:212
|
|
|
|
msgid "list of macros to undefine explicitly"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:215
|
|
|
|
msgid "*library_dirs*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:215
|
|
|
|
msgid "list of directories to search for C/C++ libraries at link time"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:219
|
|
|
|
msgid "*libraries*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:219
|
|
|
|
msgid "list of library names (not filenames or paths) to link against"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:223
|
|
|
|
msgid "*runtime_library_dirs*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:223
|
|
|
|
msgid ""
|
|
|
|
"list of directories to search for C/C++ libraries at run time (for shared "
|
|
|
|
"extensions, this is when the extension is loaded)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:229
|
|
|
|
msgid "*extra_objects*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:229
|
|
|
|
msgid ""
|
|
|
|
"list of extra files to link with (eg. object files not implied by 'sources', "
|
|
|
|
"static library that must be explicitly specified, binary resource files, "
|
|
|
|
"etc.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:236
|
|
|
|
msgid "*extra_compile_args*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:236
|
|
|
|
msgid ""
|
|
|
|
"any extra platform- and compiler-specific information to use when compiling "
|
|
|
|
"the source files in 'sources'. For platforms and compilers where a command "
|
|
|
|
"line makes sense, this is typically a list of command-line arguments, but "
|
|
|
|
"for other platforms it could be anything."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:247
|
|
|
|
msgid "*extra_link_args*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:247
|
|
|
|
msgid ""
|
|
|
|
"any extra platform- and compiler-specific information to use when linking "
|
|
|
|
"object files together to create the extension (or to create a new static "
|
|
|
|
"Python interpreter). Similar interpretation as for 'extra_compile_args'."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:256
|
|
|
|
msgid "*export_symbols*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:256
|
|
|
|
msgid ""
|
|
|
|
"list of symbols to be exported from a shared extension. Not used on all "
|
|
|
|
"platforms, and not generally necessary for Python extensions, which "
|
|
|
|
"typically export exactly one symbol: ``init`` + extension_name."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:264
|
|
|
|
msgid "*depends*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:264
|
|
|
|
msgid "list of files that the extension depends on"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "liste des fichiers dont dépend l'extension"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:267
|
|
|
|
msgid "*language*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:267
|
|
|
|
msgid ""
|
|
|
|
"extension language (i.e. ``'c'``, ``'c++'``, ``'objc'``). Will be detected "
|
|
|
|
"from the source extensions if not provided."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"langage de l'extension (par exemple ``'c'``, ``'c++'``, ``'objc'``). Il sera "
|
|
|
|
"détecté selon l'extension de la source s'il n'est pas précisé."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:273
|
|
|
|
msgid "*optional*"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "*optionnel*"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:273
|
|
|
|
msgid ""
|
|
|
|
"specifies that a build failure in the extension should not abort the build "
|
|
|
|
"process, but simply skip the extension."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:273
|
|
|
|
msgid "a boolean"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:282
|
|
|
|
msgid ""
|
|
|
|
"A :class:`Distribution` describes how to build, install and package up a "
|
|
|
|
"Python software package."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:285
|
|
|
|
msgid ""
|
|
|
|
"See the :func:`setup` function for a list of keyword arguments accepted by "
|
|
|
|
"the Distribution constructor. :func:`setup` creates a Distribution instance."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:291
|
|
|
|
msgid ""
|
|
|
|
"A :class:`Command` class (or rather, an instance of one of its subclasses) "
|
|
|
|
"implement a single distutils command."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:296
|
|
|
|
msgid ":mod:`distutils.ccompiler` --- CCompiler base class"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:302
|
|
|
|
msgid ""
|
|
|
|
"This module provides the abstract base class for the :class:`CCompiler` "
|
|
|
|
"classes. A :class:`CCompiler` instance can be used for all the compile and "
|
|
|
|
"link steps needed to build a single project. Methods are provided to set "
|
|
|
|
"options for the compiler --- macro definitions, include directories, link "
|
|
|
|
"path, libraries and the like."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:308
|
|
|
|
msgid "This module provides the following functions."
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Ce module fournit les fonctions suivantes."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:313
|
|
|
|
msgid ""
|
|
|
|
"Generate linker options for searching library directories and linking with "
|
|
|
|
"specific libraries. *libraries* and *library_dirs* are, respectively, lists "
|
|
|
|
"of library names (not filenames!) and search directories. Returns a list of "
|
|
|
|
"command-line options suitable for use with some compiler (depending on the "
|
|
|
|
"two format strings passed in)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:322
|
|
|
|
msgid ""
|
|
|
|
"Generate C pre-processor options (:option:`-D`, :option:`!-U`, :option:`!-"
|
|
|
|
"I`) as used by at least two types of compilers: the typical Unix compiler "
|
|
|
|
"and Visual C++. *macros* is the usual thing, a list of 1- or 2-tuples, where "
|
|
|
|
"``(name,)`` means undefine (:option:`!-U`) macro *name*, and ``(name, "
|
|
|
|
"value)`` means define (:option:`-D`) macro *name* to *value*. "
|
|
|
|
"*include_dirs* is just a list of directory names to be added to the header "
|
|
|
|
"file search path (:option:`!-I`). Returns a list of command-line options "
|
|
|
|
"suitable for either Unix compilers or Visual C++."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:334
|
|
|
|
msgid "Determine the default compiler to use for the given platform."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"Détermine le compilateur par défaut a utiliser par une plateforme donnée"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:336
|
|
|
|
msgid ""
|
|
|
|
"*osname* should be one of the standard Python OS names (i.e. the ones "
|
|
|
|
"returned by ``os.name``) and *platform* the common value returned by ``sys."
|
|
|
|
"platform`` for the platform in question."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:340
|
|
|
|
msgid ""
|
|
|
|
"The default values are ``os.name`` and ``sys.platform`` in case the "
|
|
|
|
"parameters are not given."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"Les valeurs par défaut sont ``os.name`` et ``sys.platform`` si les "
|
|
|
|
"paramètres ne sont pas fournis."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:346
|
|
|
|
msgid ""
|
|
|
|
"Factory function to generate an instance of some CCompiler subclass for the "
|
|
|
|
"supplied platform/compiler combination. *plat* defaults to ``os.name`` (eg. "
|
|
|
|
"``'posix'``, ``'nt'``), and *compiler* defaults to the default compiler for "
|
|
|
|
"that platform. Currently only ``'posix'`` and ``'nt'`` are supported, and "
|
|
|
|
"the default compilers are \"traditional Unix interface\" (:class:"
|
|
|
|
"`UnixCCompiler` class) and Visual C++ (:class:`MSVCCompiler` class). Note "
|
|
|
|
"that it's perfectly possible to ask for a Unix compiler object under "
|
|
|
|
"Windows, and a Microsoft compiler object under Unix---if you supply a value "
|
|
|
|
"for *compiler*, *plat* is ignored."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:362
|
|
|
|
msgid ""
|
|
|
|
"Print list of available compilers (used by the :option:`--help-compiler` "
|
|
|
|
"options to :command:`build`, :command:`build_ext`, :command:`build_clib`)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:368
|
|
|
|
msgid ""
|
|
|
|
"The abstract base class :class:`CCompiler` defines the interface that must "
|
|
|
|
"be implemented by real compiler classes. The class also has some utility "
|
|
|
|
"methods used by several compiler classes."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:372
|
|
|
|
msgid ""
|
|
|
|
"The basic idea behind a compiler abstraction class is that each instance can "
|
|
|
|
"be used for all the compile/link steps in building a single project. Thus, "
|
|
|
|
"attributes common to all of those compile and link steps --- include "
|
|
|
|
"directories, macros to define, libraries to link against, etc. --- are "
|
|
|
|
"attributes of the compiler instance. To allow for variability in how "
|
|
|
|
"individual files are treated, most of those attributes may be varied on a "
|
|
|
|
"per-compilation or per-link basis."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:380
|
|
|
|
msgid ""
|
|
|
|
"The constructor for each subclass creates an instance of the Compiler "
|
|
|
|
"object. Flags are *verbose* (show verbose output), *dry_run* (don't actually "
|
|
|
|
"execute the steps) and *force* (rebuild everything, regardless of "
|
|
|
|
"dependencies). All of these flags default to ``0`` (off). Note that you "
|
|
|
|
"probably don't want to instantiate :class:`CCompiler` or one of its "
|
|
|
|
"subclasses directly - use the :func:`distutils.CCompiler.new_compiler` "
|
|
|
|
"factory function instead."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:387
|
|
|
|
msgid ""
|
|
|
|
"The following methods allow you to manually alter compiler options for the "
|
|
|
|
"instance of the Compiler class."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:393
|
|
|
|
msgid ""
|
|
|
|
"Add *dir* to the list of directories that will be searched for header files. "
|
|
|
|
"The compiler is instructed to search directories in the order in which they "
|
|
|
|
"are supplied by successive calls to :meth:`add_include_dir`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:400
|
|
|
|
msgid ""
|
|
|
|
"Set the list of directories that will be searched to *dirs* (a list of "
|
|
|
|
"strings). Overrides any preceding calls to :meth:`add_include_dir`; "
|
|
|
|
"subsequent calls to :meth:`add_include_dir` add to the list passed to :meth:"
|
|
|
|
"`set_include_dirs`. This does not affect any list of standard include "
|
|
|
|
"directories that the compiler may search by default."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:409
|
|
|
|
msgid ""
|
|
|
|
"Add *libname* to the list of libraries that will be included in all links "
|
|
|
|
"driven by this compiler object. Note that *libname* should \\*not\\* be the "
|
|
|
|
"name of a file containing a library, but the name of the library itself: the "
|
|
|
|
"actual filename will be inferred by the linker, the compiler, or the "
|
|
|
|
"compiler class (depending on the platform)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:415
|
|
|
|
msgid ""
|
|
|
|
"The linker will be instructed to link against libraries in the order they "
|
|
|
|
"were supplied to :meth:`add_library` and/or :meth:`set_libraries`. It is "
|
|
|
|
"perfectly valid to duplicate library names; the linker will be instructed to "
|
|
|
|
"link against libraries as many times as they are mentioned."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:423
|
|
|
|
msgid ""
|
|
|
|
"Set the list of libraries to be included in all links driven by this "
|
|
|
|
"compiler object to *libnames* (a list of strings). This does not affect any "
|
|
|
|
"standard system libraries that the linker may include by default."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:430
|
|
|
|
msgid ""
|
|
|
|
"Add *dir* to the list of directories that will be searched for libraries "
|
|
|
|
"specified to :meth:`add_library` and :meth:`set_libraries`. The linker will "
|
|
|
|
"be instructed to search for libraries in the order they are supplied to :"
|
|
|
|
"meth:`add_library_dir` and/or :meth:`set_library_dirs`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:438
|
|
|
|
msgid ""
|
|
|
|
"Set the list of library search directories to *dirs* (a list of strings). "
|
|
|
|
"This does not affect any standard library search path that the linker may "
|
|
|
|
"search by default."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:445
|
|
|
|
msgid ""
|
|
|
|
"Add *dir* to the list of directories that will be searched for shared "
|
|
|
|
"libraries at runtime."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:451
|
|
|
|
msgid ""
|
|
|
|
"Set the list of directories to search for shared libraries at runtime to "
|
|
|
|
"*dirs* (a list of strings). This does not affect any standard search path "
|
|
|
|
"that the runtime linker may search by default."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:458
|
|
|
|
msgid ""
|
|
|
|
"Define a preprocessor macro for all compilations driven by this compiler "
|
|
|
|
"object. The optional parameter *value* should be a string; if it is not "
|
|
|
|
"supplied, then the macro will be defined without an explicit value and the "
|
|
|
|
"exact outcome depends on the compiler used."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:468
|
|
|
|
msgid ""
|
|
|
|
"Undefine a preprocessor macro for all compilations driven by this compiler "
|
|
|
|
"object. If the same macro is defined by :meth:`define_macro` and undefined "
|
|
|
|
"by :meth:`undefine_macro` the last call takes precedence (including multiple "
|
|
|
|
"redefinitions or undefinitions). If the macro is redefined/undefined on a "
|
|
|
|
"per-compilation basis (ie. in the call to :meth:`compile`), then that takes "
|
|
|
|
"precedence."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:478
|
|
|
|
msgid ""
|
|
|
|
"Add *object* to the list of object files (or analogues, such as explicitly "
|
|
|
|
"named library files or the output of \"resource compilers\") to be included "
|
|
|
|
"in every link driven by this compiler object."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:485
|
|
|
|
msgid ""
|
|
|
|
"Set the list of object files (or analogues) to be included in every link to "
|
|
|
|
"*objects*. This does not affect any standard object files that the linker "
|
|
|
|
"may include by default (such as system libraries)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:489
|
|
|
|
msgid ""
|
|
|
|
"The following methods implement methods for autodetection of compiler "
|
|
|
|
"options, providing some functionality similar to GNU :program:`autoconf`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:495
|
|
|
|
msgid ""
|
|
|
|
"Detect the language of a given file, or list of files. Uses the instance "
|
|
|
|
"attributes :attr:`language_map` (a dictionary), and :attr:`language_order` "
|
|
|
|
"(a list) to do the job."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:502
|
|
|
|
msgid ""
|
|
|
|
"Search the specified list of directories for a static or shared library file "
|
|
|
|
"*lib* and return the full path to that file. If *debug* is true, look for a "
|
|
|
|
"debugging version (if that makes sense on the current platform). Return "
|
|
|
|
"``None`` if *lib* wasn't found in any of the specified directories."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:510
|
|
|
|
msgid ""
|
|
|
|
"Return a boolean indicating whether *funcname* is supported on the current "
|
|
|
|
"platform. The optional arguments can be used to augment the compilation "
|
|
|
|
"environment by providing additional include files and paths and libraries "
|
|
|
|
"and paths."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:518
|
|
|
|
msgid ""
|
|
|
|
"Return the compiler option to add *dir* to the list of directories searched "
|
|
|
|
"for libraries."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:524
|
|
|
|
msgid ""
|
|
|
|
"Return the compiler option to add *lib* to the list of libraries linked into "
|
|
|
|
"the shared library or executable."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:530
|
|
|
|
msgid ""
|
|
|
|
"Return the compiler option to add *dir* to the list of directories searched "
|
|
|
|
"for runtime libraries."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:536
|
|
|
|
msgid ""
|
|
|
|
"Define the executables (and options for them) that will be run to perform "
|
|
|
|
"the various stages of compilation. The exact set of executables that may be "
|
|
|
|
"specified here depends on the compiler class (via the 'executables' class "
|
|
|
|
"attribute), but most will have:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:542
|
|
|
|
msgid "attribute"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "attribut"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:544
|
|
|
|
msgid "*compiler*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:544
|
|
|
|
msgid "the C/C++ compiler"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:546
|
|
|
|
msgid "*linker_so*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:546
|
|
|
|
msgid "linker used to create shared objects and libraries"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:549
|
|
|
|
msgid "*linker_exe*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:549
|
|
|
|
msgid "linker used to create binary executables"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:551
|
|
|
|
msgid "*archiver*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:551
|
|
|
|
msgid "static library creator"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:554
|
|
|
|
msgid ""
|
|
|
|
"On platforms with a command-line (Unix, DOS/Windows), each of these is a "
|
|
|
|
"string that will be split into executable name and (optional) list of "
|
|
|
|
"arguments. (Splitting the string is done similarly to how Unix shells "
|
|
|
|
"operate: words are delimited by spaces, but quotes and backslashes can "
|
|
|
|
"override this. See :func:`distutils.util.split_quoted`.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:560
|
|
|
|
msgid "The following methods invoke stages in the build process."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:565
|
|
|
|
msgid ""
|
|
|
|
"Compile one or more source files. Generates object files (e.g. transforms "
|
|
|
|
"a :file:`.c` file to a :file:`.o` file.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:568
|
|
|
|
msgid ""
|
|
|
|
"*sources* must be a list of filenames, most likely C/C++ files, but in "
|
|
|
|
"reality anything that can be handled by a particular compiler and compiler "
|
|
|
|
"class (eg. :class:`MSVCCompiler` can handle resource files in *sources*). "
|
|
|
|
"Return a list of object filenames, one per source filename in *sources*. "
|
|
|
|
"Depending on the implementation, not all source files will necessarily be "
|
|
|
|
"compiled, but all corresponding object filenames will be returned."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:575
|
|
|
|
msgid ""
|
|
|
|
"If *output_dir* is given, object files will be put under it, while retaining "
|
|
|
|
"their original path component. That is, :file:`foo/bar.c` normally compiles "
|
|
|
|
"to :file:`foo/bar.o` (for a Unix implementation); if *output_dir* is "
|
|
|
|
"*build*, then it would compile to :file:`build/foo/bar.o`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:580
|
|
|
|
msgid ""
|
|
|
|
"*macros*, if given, must be a list of macro definitions. A macro definition "
|
|
|
|
"is either a ``(name, value)`` 2-tuple or a ``(name,)`` 1-tuple. The former "
|
|
|
|
"defines a macro; if the value is ``None``, the macro is defined without an "
|
|
|
|
"explicit value. The 1-tuple case undefines a macro. Later definitions/"
|
|
|
|
"redefinitions/undefinitions take precedence."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:586
|
|
|
|
msgid ""
|
|
|
|
"*include_dirs*, if given, must be a list of strings, the directories to add "
|
|
|
|
"to the default include file search path for this compilation only."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:589
|
|
|
|
msgid ""
|
|
|
|
"*debug* is a boolean; if true, the compiler will be instructed to output "
|
|
|
|
"debug symbols in (or alongside) the object file(s)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:592
|
|
|
|
msgid ""
|
|
|
|
"*extra_preargs* and *extra_postargs* are implementation-dependent. On "
|
|
|
|
"platforms that have the notion of a command-line (e.g. Unix, DOS/Windows), "
|
|
|
|
"they are most likely lists of strings: extra command-line arguments to "
|
|
|
|
"prepend/append to the compiler command line. On other platforms, consult "
|
|
|
|
"the implementation class documentation. In any event, they are intended as "
|
|
|
|
"an escape hatch for those occasions when the abstract compiler framework "
|
|
|
|
"doesn't cut the mustard."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:599
|
|
|
|
msgid ""
|
|
|
|
"*depends*, if given, is a list of filenames that all targets depend on. If "
|
|
|
|
"a source file is older than any file in depends, then the source file will "
|
|
|
|
"be recompiled. This supports dependency tracking, but only at a coarse "
|
|
|
|
"granularity."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:604
|
|
|
|
msgid "Raises :exc:`CompileError` on failure."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:609
|
|
|
|
msgid ""
|
|
|
|
"Link a bunch of stuff together to create a static library file. The \"bunch "
|
|
|
|
"of stuff\" consists of the list of object files supplied as *objects*, the "
|
|
|
|
"extra object files supplied to :meth:`add_link_object` and/or :meth:"
|
|
|
|
"`set_link_objects`, the libraries supplied to :meth:`add_library` and/or :"
|
|
|
|
"meth:`set_libraries`, and the libraries supplied as *libraries* (if any)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:615
|
|
|
|
msgid ""
|
|
|
|
"*output_libname* should be a library name, not a filename; the filename will "
|
|
|
|
"be inferred from the library name. *output_dir* is the directory where the "
|
|
|
|
"library file will be put."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:621
|
|
|
|
msgid ""
|
|
|
|
"*debug* is a boolean; if true, debugging information will be included in the "
|
|
|
|
"library (note that on most platforms, it is the compile step where this "
|
|
|
|
"matters: the *debug* flag is included here just for consistency)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:625 ../Doc/distutils/apiref.rst:667
|
|
|
|
msgid ""
|
|
|
|
"*target_lang* is the target language for which the given objects are being "
|
|
|
|
"compiled. This allows specific linkage time treatment of certain languages."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:628
|
|
|
|
msgid "Raises :exc:`LibError` on failure."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:633
|
|
|
|
msgid ""
|
|
|
|
"Link a bunch of stuff together to create an executable or shared library "
|
|
|
|
"file."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:635
|
|
|
|
msgid ""
|
|
|
|
"The \"bunch of stuff\" consists of the list of object files supplied as "
|
|
|
|
"*objects*. *output_filename* should be a filename. If *output_dir* is "
|
|
|
|
"supplied, *output_filename* is relative to it (i.e. *output_filename* can "
|
|
|
|
"provide directory components if needed)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:640
|
|
|
|
msgid ""
|
|
|
|
"*libraries* is a list of libraries to link against. These are library "
|
|
|
|
"names, not filenames, since they're translated into filenames in a platform-"
|
|
|
|
"specific way (eg. *foo* becomes :file:`libfoo.a` on Unix and :file:`foo.lib` "
|
|
|
|
"on DOS/Windows). However, they can include a directory component, which "
|
|
|
|
"means the linker will look in that specific directory rather than searching "
|
|
|
|
"all the normal locations."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:647
|
|
|
|
msgid ""
|
|
|
|
"*library_dirs*, if supplied, should be a list of directories to search for "
|
|
|
|
"libraries that were specified as bare library names (ie. no directory "
|
|
|
|
"component). These are on top of the system default and those supplied to :"
|
|
|
|
"meth:`add_library_dir` and/or :meth:`set_library_dirs`. "
|
|
|
|
"*runtime_library_dirs* is a list of directories that will be embedded into "
|
|
|
|
"the shared library and used to search for other shared libraries that \\*it"
|
|
|
|
"\\* depends on at run-time. (This may only be relevant on Unix.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:655
|
|
|
|
msgid ""
|
|
|
|
"*export_symbols* is a list of symbols that the shared library will export. "
|
|
|
|
"(This appears to be relevant only on Windows.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:658
|
|
|
|
msgid ""
|
|
|
|
"*debug* is as for :meth:`compile` and :meth:`create_static_lib`, with the "
|
|
|
|
"slight distinction that it actually matters on most platforms (as opposed "
|
|
|
|
"to :meth:`create_static_lib`, which includes a *debug* flag mostly for "
|
|
|
|
"form's sake)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:663
|
|
|
|
msgid ""
|
|
|
|
"*extra_preargs* and *extra_postargs* are as for :meth:`compile` (except of "
|
|
|
|
"course that they supply command-line arguments for the particular linker "
|
|
|
|
"being used)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:670
|
|
|
|
msgid "Raises :exc:`LinkError` on failure."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:675
|
|
|
|
msgid ""
|
|
|
|
"Link an executable. *output_progname* is the name of the file executable, "
|
|
|
|
"while *objects* are a list of object filenames to link in. Other arguments "
|
|
|
|
"are as for the :meth:`link` method."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:682
|
|
|
|
msgid ""
|
|
|
|
"Link a shared library. *output_libname* is the name of the output library, "
|
|
|
|
"while *objects* is a list of object filenames to link in. Other arguments "
|
|
|
|
"are as for the :meth:`link` method."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:689
|
|
|
|
msgid ""
|
|
|
|
"Link a shared object. *output_filename* is the name of the shared object "
|
|
|
|
"that will be created, while *objects* is a list of object filenames to link "
|
|
|
|
"in. Other arguments are as for the :meth:`link` method."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:696
|
|
|
|
msgid ""
|
|
|
|
"Preprocess a single C/C++ source file, named in *source*. Output will be "
|
|
|
|
"written to file named *output_file*, or *stdout* if *output_file* not "
|
|
|
|
"supplied. *macros* is a list of macro definitions as for :meth:`compile`, "
|
|
|
|
"which will augment the macros set with :meth:`define_macro` and :meth:"
|
|
|
|
"`undefine_macro`. *include_dirs* is a list of directory names that will be "
|
|
|
|
"added to the default list, in the same way as :meth:`add_include_dir`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:703
|
|
|
|
msgid "Raises :exc:`PreprocessError` on failure."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:705
|
|
|
|
msgid ""
|
|
|
|
"The following utility methods are defined by the :class:`CCompiler` class, "
|
|
|
|
"for use by the various concrete subclasses."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:711
|
|
|
|
msgid ""
|
|
|
|
"Returns the filename of the executable for the given *basename*. Typically "
|
|
|
|
"for non-Windows platforms this is the same as the basename, while Windows "
|
|
|
|
"will get a :file:`.exe` added."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:718
|
|
|
|
msgid ""
|
|
|
|
"Returns the filename for the given library name on the current platform. On "
|
|
|
|
"Unix a library with *lib_type* of ``'static'`` will typically be of the "
|
|
|
|
"form :file:`liblibname.a`, while a *lib_type* of ``'dynamic'`` will be of "
|
|
|
|
"the form :file:`liblibname.so`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:726
|
|
|
|
msgid ""
|
|
|
|
"Returns the name of the object files for the given source files. "
|
|
|
|
"*source_filenames* should be a list of filenames."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:732
|
|
|
|
msgid ""
|
|
|
|
"Returns the name of a shared object file for the given file name *basename*."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:737
|
|
|
|
msgid ""
|
|
|
|
"Invokes :func:`distutils.util.execute`. This method invokes a Python "
|
|
|
|
"function *func* with the given arguments *args*, after logging and taking "
|
|
|
|
"into account the *dry_run* flag."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:744
|
|
|
|
msgid ""
|
|
|
|
"Invokes :func:`distutils.util.spawn`. This invokes an external process to "
|
|
|
|
"run the given command."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:750
|
|
|
|
msgid ""
|
|
|
|
"Invokes :func:`distutils.dir_util.mkpath`. This creates a directory and any "
|
|
|
|
"missing ancestor directories."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:756
|
|
|
|
msgid "Invokes :meth:`distutils.file_util.move_file`. Renames *src* to *dst*."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:761
|
|
|
|
msgid "Write a message using :func:`distutils.log.debug`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:766
|
|
|
|
msgid "Write a warning message *msg* to standard error."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:771
|
|
|
|
msgid ""
|
|
|
|
"If the *debug* flag is set on this :class:`CCompiler` instance, print *msg* "
|
|
|
|
"to standard output, otherwise do nothing."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:783
|
|
|
|
msgid ":mod:`distutils.unixccompiler` --- Unix C Compiler"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:789
|
|
|
|
msgid ""
|
|
|
|
"This module provides the :class:`UnixCCompiler` class, a subclass of :class:"
|
|
|
|
"`CCompiler` that handles the typical Unix-style command-line C compiler:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:792
|
|
|
|
msgid "macros defined with :option:`-Dname[=value]`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:794
|
|
|
|
msgid "macros undefined with :option:`-Uname`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:796
|
|
|
|
msgid "include search directories specified with :option:`-Idir`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:798
|
|
|
|
msgid "libraries specified with :option:`-llib`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:800
|
|
|
|
msgid "library search directories specified with :option:`-Ldir`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:802
|
|
|
|
msgid ""
|
|
|
|
"compile handled by :program:`cc` (or similar) executable with :option:`!-c` "
|
|
|
|
"option: compiles :file:`.c` to :file:`.o`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:805
|
|
|
|
msgid ""
|
|
|
|
"link static library handled by :program:`ar` command (possibly with :program:"
|
|
|
|
"`ranlib`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:808
|
|
|
|
msgid "link shared library handled by :program:`cc` :option:`-shared`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:812
|
|
|
|
msgid ":mod:`distutils.msvccompiler` --- Microsoft Compiler"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:818
|
|
|
|
msgid ""
|
|
|
|
"This module provides :class:`MSVCCompiler`, an implementation of the "
|
|
|
|
"abstract :class:`CCompiler` class for Microsoft Visual Studio. Typically, "
|
|
|
|
"extension modules need to be compiled with the same compiler that was used "
|
|
|
|
"to compile Python. For Python 2.3 and earlier, the compiler was Visual "
|
|
|
|
"Studio 6. For Python 2.4 and 2.5, the compiler is Visual Studio .NET 2003. "
|
|
|
|
"The AMD64 and Itanium binaries are created using the Platform SDK."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:825
|
|
|
|
msgid ""
|
|
|
|
":class:`MSVCCompiler` will normally choose the right compiler, linker etc. "
|
|
|
|
"on its own. To override this choice, the environment variables "
|
|
|
|
"*DISTUTILS_USE_SDK* and *MSSdk* must be both set. *MSSdk* indicates that the "
|
|
|
|
"current environment has been setup by the SDK's ``SetEnv.Cmd`` script, or "
|
|
|
|
"that the environment variables had been registered when the SDK was "
|
|
|
|
"installed; *DISTUTILS_USE_SDK* indicates that the distutils user has made an "
|
|
|
|
"explicit choice to override the compiler selection by :class:`MSVCCompiler`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:835
|
|
|
|
msgid ":mod:`distutils.bcppcompiler` --- Borland Compiler"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:840
|
|
|
|
msgid ""
|
|
|
|
"This module provides :class:`BorlandCCompiler`, a subclass of the abstract :"
|
|
|
|
"class:`CCompiler` class for the Borland C++ compiler."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:845
|
|
|
|
msgid ":mod:`distutils.cygwincompiler` --- Cygwin Compiler"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:850
|
|
|
|
msgid ""
|
|
|
|
"This module provides the :class:`CygwinCCompiler` class, a subclass of :"
|
|
|
|
"class:`UnixCCompiler` that handles the Cygwin port of the GNU C compiler to "
|
|
|
|
"Windows. It also contains the Mingw32CCompiler class which handles the "
|
|
|
|
"mingw32 port of GCC (same as cygwin in no-cygwin mode)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:857
|
|
|
|
msgid ":mod:`distutils.archive_util` --- Archiving utilities"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:863
|
|
|
|
msgid ""
|
|
|
|
"This module provides a few functions for creating archive files, such as "
|
|
|
|
"tarballs or zipfiles."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:869
|
|
|
|
msgid ""
|
|
|
|
"Create an archive file (eg. ``zip`` or ``tar``). *base_name* is the name "
|
|
|
|
"of the file to create, minus any format-specific extension; *format* is the "
|
|
|
|
"archive format: one of ``zip``, ``tar``, ``gztar``, ``bztar``, ``xztar``, or "
|
|
|
|
"``ztar``. *root_dir* is a directory that will be the root directory of the "
|
|
|
|
"archive; ie. we typically ``chdir`` into *root_dir* before creating the "
|
|
|
|
"archive. *base_dir* is the directory where we start archiving from; ie. "
|
|
|
|
"*base_dir* will be the common prefix of all files and directories in the "
|
|
|
|
"archive. *root_dir* and *base_dir* both default to the current directory. "
|
|
|
|
"Returns the name of the archive file."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:879 ../Doc/distutils/builtdist.rst:103
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:44
|
|
|
|
msgid "Added support for the ``xztar`` format."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:885
|
|
|
|
msgid ""
|
|
|
|
"'Create an (optional compressed) archive as a tar file from all files in and "
|
|
|
|
"under *base_dir*. *compress* must be ``'gzip'`` (the default), ``'bzip2'``, "
|
|
|
|
"``'xz'``, ``'compress'``, or ``None``. For the ``'compress'`` method the "
|
|
|
|
"compression utility named by :program:`compress` must be on the default "
|
|
|
|
"program search path, so this is probably Unix-specific. The output tar file "
|
|
|
|
"will be named :file:`base_dir.tar`, possibly plus the appropriate "
|
|
|
|
"compression extension (``.gz``, ``.bz2``, ``.xz`` or ``.Z``). Return the "
|
|
|
|
"output filename."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:894
|
|
|
|
msgid "Added support for the ``xz`` compression."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:900
|
|
|
|
msgid ""
|
|
|
|
"Create a zip file from all files in and under *base_dir*. The output zip "
|
|
|
|
"file will be named *base_name* + :file:`.zip`. Uses either the :mod:"
|
|
|
|
"`zipfile` Python module (if available) or the InfoZIP :file:`zip` utility "
|
|
|
|
"(if installed and found on the default search path). If neither tool is "
|
|
|
|
"available, raises :exc:`DistutilsExecError`. Returns the name of the "
|
|
|
|
"output zip file."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:908
|
|
|
|
msgid ":mod:`distutils.dep_util` --- Dependency checking"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:914
|
|
|
|
msgid ""
|
|
|
|
"This module provides functions for performing simple, timestamp-based "
|
|
|
|
"dependency of files and groups of files; also, functions based entirely on "
|
|
|
|
"such timestamp dependency analysis."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:921
|
|
|
|
msgid ""
|
|
|
|
"Return true if *source* exists and is more recently modified than *target*, "
|
|
|
|
"or if *source* exists and *target* doesn't. Return false if both exist and "
|
|
|
|
"*target* is the same age or newer than *source*. Raise :exc:"
|
|
|
|
"`DistutilsFileError` if *source* does not exist."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:929
|
|
|
|
msgid ""
|
|
|
|
"Walk two filename lists in parallel, testing if each source is newer than "
|
|
|
|
"its corresponding target. Return a pair of lists (*sources*, *targets*) "
|
|
|
|
"where source is newer than target, according to the semantics of :func:"
|
|
|
|
"`newer`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:938
|
|
|
|
msgid ""
|
|
|
|
"Return true if *target* is out-of-date with respect to any file listed in "
|
|
|
|
"*sources* In other words, if *target* exists and is newer than every file "
|
|
|
|
"in *sources*, return false; otherwise return true. *missing* controls what "
|
|
|
|
"we do when a source file is missing; the default (``'error'``) is to blow up "
|
|
|
|
"with an :exc:`OSError` from inside :func:`os.stat`; if it is ``'ignore'``, "
|
|
|
|
"we silently drop any missing source files; if it is ``'newer'``, any missing "
|
|
|
|
"source files make us assume that *target* is out-of-date (this is handy in "
|
|
|
|
"\"dry-run\" mode: it'll make you pretend to carry out commands that wouldn't "
|
|
|
|
"work because inputs are missing, but that doesn't matter because you're not "
|
|
|
|
"actually going to run the commands)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:951
|
|
|
|
msgid ":mod:`distutils.dir_util` --- Directory tree operations"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:957
|
|
|
|
msgid ""
|
|
|
|
"This module provides functions for operating on directories and trees of "
|
|
|
|
"directories."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:963
|
|
|
|
msgid ""
|
|
|
|
"Create a directory and any missing ancestor directories. If the directory "
|
|
|
|
"already exists (or if *name* is the empty string, which means the current "
|
|
|
|
"directory, which of course exists), then do nothing. Raise :exc:"
|
|
|
|
"`DistutilsFileError` if unable to create some directory along the way (eg. "
|
|
|
|
"some sub-path exists, but is a file rather than a directory). If *verbose* "
|
|
|
|
"is true, print a one-line summary of each mkdir to stdout. Return the list "
|
|
|
|
"of directories actually created."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:974
|
|
|
|
msgid ""
|
|
|
|
"Create all the empty directories under *base_dir* needed to put *files* "
|
|
|
|
"there. *base_dir* is just the name of a directory which doesn't necessarily "
|
|
|
|
"exist yet; *files* is a list of filenames to be interpreted relative to "
|
|
|
|
"*base_dir*. *base_dir* + the directory portion of every file in *files* will "
|
|
|
|
"be created if it doesn't already exist. *mode*, *verbose* and *dry_run* "
|
|
|
|
"flags are as for :func:`mkpath`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:984
|
|
|
|
msgid ""
|
|
|
|
"Copy an entire directory tree *src* to a new location *dst*. Both *src* and "
|
|
|
|
"*dst* must be directory names. If *src* is not a directory, raise :exc:"
|
|
|
|
"`DistutilsFileError`. If *dst* does not exist, it is created with :func:"
|
|
|
|
"`mkpath`. The end result of the copy is that every file in *src* is copied "
|
|
|
|
"to *dst*, and directories under *src* are recursively copied to *dst*. "
|
|
|
|
"Return the list of files that were copied or might have been copied, using "
|
|
|
|
"their output name. The return value is unaffected by *update* or *dry_run*: "
|
|
|
|
"it is simply the list of all files under *src*, with the names changed to be "
|
|
|
|
"under *dst*."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:994
|
|
|
|
msgid ""
|
|
|
|
"*preserve_mode* and *preserve_times* are the same as for :func:`distutils."
|
|
|
|
"file_util.copy_file`; note that they only apply to regular files, not to "
|
|
|
|
"directories. If *preserve_symlinks* is true, symlinks will be copied as "
|
|
|
|
"symlinks (on platforms that support them!); otherwise (the default), the "
|
|
|
|
"destination of the symlink will be copied. *update* and *verbose* are the "
|
|
|
|
"same as for :func:`copy_file`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1002
|
|
|
|
msgid ""
|
|
|
|
"Files in *src* that begin with :file:`.nfs` are skipped (more information on "
|
|
|
|
"these files is available in answer D2 of the `NFS FAQ page <http://nfs."
|
|
|
|
"sourceforge.net/#section_d>`_)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1006
|
|
|
|
msgid "NFS files are ignored."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1011
|
|
|
|
msgid ""
|
|
|
|
"Recursively remove *directory* and all files and directories underneath it. "
|
|
|
|
"Any errors are ignored (apart from being reported to ``sys.stdout`` if "
|
|
|
|
"*verbose* is true)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1017
|
|
|
|
msgid ":mod:`distutils.file_util` --- Single file operations"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1023
|
|
|
|
msgid ""
|
|
|
|
"This module contains some utility functions for operating on individual "
|
|
|
|
"files."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1028
|
|
|
|
msgid ""
|
|
|
|
"Copy file *src* to *dst*. If *dst* is a directory, then *src* is copied "
|
|
|
|
"there with the same name; otherwise, it must be a filename. (If the file "
|
|
|
|
"exists, it will be ruthlessly clobbered.) If *preserve_mode* is true (the "
|
|
|
|
"default), the file's mode (type and permission bits, or whatever is "
|
|
|
|
"analogous on the current platform) is copied. If *preserve_times* is true "
|
|
|
|
"(the default), the last-modified and last-access times are copied as well. "
|
|
|
|
"If *update* is true, *src* will only be copied if *dst* does not exist, or "
|
|
|
|
"if *dst* does exist but is older than *src*."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1037
|
|
|
|
msgid ""
|
|
|
|
"*link* allows you to make hard links (using :func:`os.link`) or symbolic "
|
|
|
|
"links (using :func:`os.symlink`) instead of copying: set it to ``'hard'`` or "
|
|
|
|
"``'sym'``; if it is ``None`` (the default), files are copied. Don't set "
|
|
|
|
"*link* on systems that don't support it: :func:`copy_file` doesn't check if "
|
|
|
|
"hard or symbolic linking is available. It uses :func:`_copy_file_contents` "
|
|
|
|
"to copy file contents."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1044
|
|
|
|
msgid ""
|
|
|
|
"Return a tuple ``(dest_name, copied)``: *dest_name* is the actual name of "
|
|
|
|
"the output file, and *copied* is true if the file was copied (or would have "
|
|
|
|
"been copied, if *dry_run* true)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1058
|
|
|
|
msgid ""
|
|
|
|
"Move file *src* to *dst*. If *dst* is a directory, the file will be moved "
|
|
|
|
"into it with the same name; otherwise, *src* is just renamed to *dst*. "
|
|
|
|
"Returns the new full name of the file."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1064
|
|
|
|
msgid ""
|
|
|
|
"Handles cross-device moves on Unix using :func:`copy_file`. What about "
|
|
|
|
"other systems?"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1070
|
|
|
|
msgid ""
|
|
|
|
"Create a file called *filename* and write *contents* (a sequence of strings "
|
|
|
|
"without line terminators) to it."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1075
|
|
|
|
msgid ":mod:`distutils.util` --- Miscellaneous other utility functions"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1081
|
|
|
|
msgid ""
|
|
|
|
"This module contains other assorted bits and pieces that don't fit into any "
|
|
|
|
"other utility module."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1087
|
|
|
|
msgid ""
|
|
|
|
"Return a string that identifies the current platform. This is used mainly "
|
|
|
|
"to distinguish platform-specific build directories and platform-specific "
|
|
|
|
"built distributions. Typically includes the OS name and version and the "
|
|
|
|
"architecture (as supplied by 'os.uname()'), although the exact information "
|
|
|
|
"included depends on the OS; eg. for IRIX the architecture isn't particularly "
|
|
|
|
"important (IRIX only runs on SGI hardware), but for Linux the kernel version "
|
|
|
|
"isn't particularly important."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1095
|
|
|
|
msgid "Examples of returned values:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1097
|
|
|
|
msgid "``linux-i586``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1098
|
|
|
|
msgid "``linux-alpha``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1099
|
|
|
|
msgid "``solaris-2.6-sun4u``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1100
|
|
|
|
msgid "``irix-5.3``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1101
|
|
|
|
msgid "``irix64-6.2``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1103
|
|
|
|
msgid "For non-POSIX platforms, currently just returns ``sys.platform``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1105
|
|
|
|
msgid ""
|
|
|
|
"For Mac OS X systems the OS version reflects the minimal version on which "
|
|
|
|
"binaries will run (that is, the value of ``MACOSX_DEPLOYMENT_TARGET`` during "
|
|
|
|
"the build of Python), not the OS version of the current system."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1109
|
|
|
|
msgid ""
|
|
|
|
"For universal binary builds on Mac OS X the architecture value reflects the "
|
|
|
|
"universal binary status instead of the architecture of the current "
|
|
|
|
"processor. For 32-bit universal binaries the architecture is ``fat``, for 64-"
|
|
|
|
"bit universal binaries the architecture is ``fat64``, and for 4-way "
|
|
|
|
"universal binaries the architecture is ``universal``. Starting from Python "
|
|
|
|
"2.7 and Python 3.2 the architecture ``fat3`` is used for a 3-way universal "
|
|
|
|
"build (ppc, i386, x86_64) and ``intel`` is used for a universal build with "
|
|
|
|
"the i386 and x86_64 architectures"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1118
|
|
|
|
msgid "Examples of returned values on Mac OS X:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1120
|
|
|
|
msgid "``macosx-10.3-ppc``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1122
|
|
|
|
msgid "``macosx-10.3-fat``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1124
|
|
|
|
msgid "``macosx-10.5-universal``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1126
|
|
|
|
msgid "``macosx-10.6-intel``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1131
|
|
|
|
msgid ""
|
|
|
|
"Return 'pathname' as a name that will work on the native filesystem, i.e. "
|
|
|
|
"split it on '/' and put it back together again using the current directory "
|
|
|
|
"separator. Needed because filenames in the setup script are always supplied "
|
|
|
|
"in Unix style, and have to be converted to the local convention before we "
|
|
|
|
"can actually use them in the filesystem. Raises :exc:`ValueError` on non-"
|
|
|
|
"Unix-ish systems if *pathname* either starts or ends with a slash."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1141
|
|
|
|
msgid ""
|
|
|
|
"Return *pathname* with *new_root* prepended. If *pathname* is relative, "
|
|
|
|
"this is equivalent to ``os.path.join(new_root,pathname)`` Otherwise, it "
|
|
|
|
"requires making *pathname* relative and then joining the two, which is "
|
|
|
|
"tricky on DOS/Windows."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1148
|
|
|
|
msgid ""
|
|
|
|
"Ensure that 'os.environ' has all the environment variables we guarantee that "
|
|
|
|
"users can use in config files, command-line options, etc. Currently this "
|
|
|
|
"includes:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1152
|
|
|
|
msgid ":envvar:`HOME` - user's home directory (Unix only)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1153
|
|
|
|
msgid ""
|
|
|
|
":envvar:`PLAT` - description of the current platform, including hardware and "
|
|
|
|
"OS (see :func:`get_platform`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1159
|
|
|
|
msgid ""
|
|
|
|
"Perform shell/Perl-style variable substitution on *s*. Every occurrence of "
|
|
|
|
"``$`` followed by a name is considered a variable, and variable is "
|
|
|
|
"substituted by the value found in the *local_vars* dictionary, or in ``os."
|
|
|
|
"environ`` if it's not in *local_vars*. *os.environ* is first checked/"
|
|
|
|
"augmented to guarantee that it contains certain values: see :func:"
|
|
|
|
"`check_environ`. Raise :exc:`ValueError` for any variables not found in "
|
|
|
|
"either *local_vars* or ``os.environ``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1166
|
|
|
|
msgid ""
|
|
|
|
"Note that this is not a fully-fledged string interpolation function. A valid "
|
|
|
|
"``$variable`` can consist only of upper and lower case letters, numbers and "
|
|
|
|
"an underscore. No { } or ( ) style quoting is available."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1173
|
|
|
|
msgid ""
|
|
|
|
"Split a string up according to Unix shell-like rules for quotes and "
|
|
|
|
"backslashes. In short: words are delimited by spaces, as long as those "
|
|
|
|
"spaces are not escaped by a backslash, or inside a quoted string. Single and "
|
|
|
|
"double quotes are equivalent, and the quote characters can be backslash-"
|
|
|
|
"escaped. The backslash is stripped from any two-character escape sequence, "
|
|
|
|
"leaving only the escaped character. The quote characters are stripped from "
|
|
|
|
"any quoted string. Returns a list of words."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1186
|
|
|
|
msgid ""
|
|
|
|
"Perform some action that affects the outside world (for instance, writing to "
|
|
|
|
"the filesystem). Such actions are special because they are disabled by the "
|
|
|
|
"*dry_run* flag. This method takes care of all that bureaucracy for you; "
|
|
|
|
"all you have to do is supply the function to call and an argument tuple for "
|
|
|
|
"it (to embody the \"external action\" being performed), and an optional "
|
|
|
|
"message to print."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1195
|
|
|
|
msgid "Convert a string representation of truth to true (1) or false (0)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1197
|
|
|
|
msgid ""
|
|
|
|
"True values are ``y``, ``yes``, ``t``, ``true``, ``on`` and ``1``; false "
|
|
|
|
"values are ``n``, ``no``, ``f``, ``false``, ``off`` and ``0``. Raises :exc:"
|
|
|
|
"`ValueError` if *val* is anything else."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1204
|
|
|
|
msgid ""
|
|
|
|
"Byte-compile a collection of Python source files to :file:`.pyc` files in a :"
|
|
|
|
"file:`__pycache__` subdirectory (see :pep:`3147` and :pep:`488`). *py_files* "
|
|
|
|
"is a list of files to compile; any files that don't end in :file:`.py` are "
|
|
|
|
"silently skipped. *optimize* must be one of the following:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1209
|
|
|
|
msgid "``0`` - don't optimize"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1210
|
|
|
|
msgid "``1`` - normal optimization (like ``python -O``)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1211
|
|
|
|
msgid "``2`` - extra optimization (like ``python -OO``)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1213
|
|
|
|
msgid "If *force* is true, all files are recompiled regardless of timestamps."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1215
|
|
|
|
msgid ""
|
|
|
|
"The source filename encoded in each :term:`bytecode` file defaults to the "
|
|
|
|
"filenames listed in *py_files*; you can modify these with *prefix* and "
|
|
|
|
"*basedir*. *prefix* is a string that will be stripped off of each source "
|
|
|
|
"filename, and *base_dir* is a directory name that will be prepended (after "
|
|
|
|
"*prefix* is stripped). You can supply either or both (or neither) of "
|
|
|
|
"*prefix* and *base_dir*, as you wish."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1222
|
|
|
|
msgid ""
|
|
|
|
"If *dry_run* is true, doesn't actually do anything that would affect the "
|
|
|
|
"filesystem."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1225
|
|
|
|
msgid ""
|
|
|
|
"Byte-compilation is either done directly in this interpreter process with "
|
|
|
|
"the standard :mod:`py_compile` module, or indirectly by writing a temporary "
|
|
|
|
"script and executing it. Normally, you should let :func:`byte_compile` "
|
|
|
|
"figure out to use direct compilation or not (see the source for details). "
|
|
|
|
"The *direct* flag is used by the script generated in indirect mode; unless "
|
|
|
|
"you know what you're doing, leave it set to ``None``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1232
|
|
|
|
msgid ""
|
|
|
|
"Create ``.pyc`` files with an :func:`import magic tag <imp.get_tag>` in "
|
|
|
|
"their name, in a :file:`__pycache__` subdirectory instead of files without "
|
|
|
|
"tag in the current directory."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1237
|
|
|
|
msgid "Create ``.pyc`` files according to :pep:`488`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1243
|
|
|
|
msgid ""
|
|
|
|
"Return a version of *header* escaped for inclusion in an :rfc:`822` header, "
|
|
|
|
"by ensuring there are 8 spaces space after each newline. Note that it does "
|
|
|
|
"no other modification of the string."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1253
|
|
|
|
msgid ":mod:`distutils.dist` --- The Distribution class"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1260
|
|
|
|
msgid ""
|
|
|
|
"This module provides the :class:`~distutils.core.Distribution` class, which "
|
|
|
|
"represents the module distribution being built/installed/distributed."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1265
|
|
|
|
msgid ":mod:`distutils.extension` --- The Extension class"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1272
|
|
|
|
msgid ""
|
|
|
|
"This module provides the :class:`Extension` class, used to describe C/C++ "
|
|
|
|
"extension modules in setup scripts."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1280
|
|
|
|
msgid ":mod:`distutils.debug` --- Distutils debug mode"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1286
|
|
|
|
msgid "This module provides the DEBUG flag."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1290
|
|
|
|
msgid ":mod:`distutils.errors` --- Distutils exceptions"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1296
|
|
|
|
msgid ""
|
|
|
|
"Provides exceptions used by the Distutils modules. Note that Distutils "
|
|
|
|
"modules may raise standard exceptions; in particular, SystemExit is usually "
|
|
|
|
"raised for errors that are obviously the end-user's fault (eg. bad command-"
|
|
|
|
"line arguments)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1300
|
|
|
|
msgid ""
|
|
|
|
"This module is safe to use in ``from ... import *`` mode; it only exports "
|
|
|
|
"symbols whose names start with ``Distutils`` and end with ``Error``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1305
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.fancy_getopt` --- Wrapper around the standard getopt module"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1311
|
|
|
|
msgid ""
|
|
|
|
"This module provides a wrapper around the standard :mod:`getopt` module "
|
|
|
|
"that provides the following additional features:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1314
|
|
|
|
msgid "short and long options are tied together"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1316
|
|
|
|
msgid ""
|
|
|
|
"options have help strings, so :func:`fancy_getopt` could potentially create "
|
|
|
|
"a complete usage summary"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1319
|
|
|
|
msgid "options set attributes of a passed-in object"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1321
|
|
|
|
msgid ""
|
|
|
|
"boolean options can have \"negative aliases\" --- eg. if :option:`--quiet` "
|
|
|
|
"is the \"negative alias\" of :option:`--verbose`, then :option:`--quiet` on "
|
|
|
|
"the command line sets *verbose* to false."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1327
|
|
|
|
msgid ""
|
|
|
|
"Wrapper function. *options* is a list of ``(long_option, short_option, "
|
|
|
|
"help_string)`` 3-tuples as described in the constructor for :class:"
|
|
|
|
"`FancyGetopt`. *negative_opt* should be a dictionary mapping option names to "
|
|
|
|
"option names, both the key and value should be in the *options* list. "
|
|
|
|
"*object* is an object which will be used to store values (see the :meth:"
|
|
|
|
"`getopt` method of the :class:`FancyGetopt` class). *args* is the argument "
|
|
|
|
"list. Will use ``sys.argv[1:]`` if you pass ``None`` as *args*."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1338
|
|
|
|
msgid "Wraps *text* to less than *width* wide."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1343
|
|
|
|
msgid ""
|
|
|
|
"The option_table is a list of 3-tuples: ``(long_option, short_option, "
|
|
|
|
"help_string)``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1346
|
|
|
|
msgid ""
|
|
|
|
"If an option takes an argument, its *long_option* should have ``'='`` "
|
|
|
|
"appended; *short_option* should just be a single character, no ``':'`` in "
|
|
|
|
"any case. *short_option* should be ``None`` if a *long_option* doesn't have "
|
|
|
|
"a corresponding *short_option*. All option tuples must have long options."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1351
|
|
|
|
msgid "The :class:`FancyGetopt` class provides the following methods:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1356
|
|
|
|
msgid "Parse command-line options in args. Store as attributes on *object*."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1358
|
|
|
|
msgid ""
|
|
|
|
"If *args* is ``None`` or not supplied, uses ``sys.argv[1:]``. If *object* "
|
|
|
|
"is ``None`` or not supplied, creates a new :class:`OptionDummy` instance, "
|
|
|
|
"stores option values there, and returns a tuple ``(args, object)``. If "
|
|
|
|
"*object* is supplied, it is modified in place and :func:`getopt` just "
|
|
|
|
"returns *args*; in both cases, the returned *args* is a modified copy of the "
|
|
|
|
"passed-in *args* list, which is left untouched."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1370
|
|
|
|
msgid ""
|
|
|
|
"Returns the list of ``(option, value)`` tuples processed by the previous run "
|
|
|
|
"of :meth:`getopt` Raises :exc:`RuntimeError` if :meth:`getopt` hasn't been "
|
|
|
|
"called yet."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1377
|
|
|
|
msgid ""
|
|
|
|
"Generate help text (a list of strings, one per suggested line of output) "
|
|
|
|
"from the option table for this :class:`FancyGetopt` object."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1380
|
|
|
|
msgid "If supplied, prints the supplied *header* at the top of the help."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1384
|
|
|
|
msgid ":mod:`distutils.filelist` --- The FileList class"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1391
|
|
|
|
msgid ""
|
|
|
|
"This module provides the :class:`FileList` class, used for poking about the "
|
|
|
|
"filesystem and building lists of files."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1396
|
|
|
|
msgid ":mod:`distutils.log` --- Simple PEP 282-style logging"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1403
|
|
|
|
msgid ":mod:`distutils.spawn` --- Spawn a sub-process"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1409
|
|
|
|
msgid ""
|
|
|
|
"This module provides the :func:`spawn` function, a front-end to various "
|
|
|
|
"platform-specific functions for launching another program in a sub-process. "
|
|
|
|
"Also provides :func:`find_executable` to search the path for a given "
|
|
|
|
"executable name."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1416
|
|
|
|
msgid ":mod:`distutils.sysconfig` --- System configuration information"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1425
|
|
|
|
msgid ""
|
|
|
|
"The :mod:`distutils.sysconfig` module provides access to Python's low-level "
|
|
|
|
"configuration information. The specific configuration variables available "
|
|
|
|
"depend heavily on the platform and configuration. The specific variables "
|
|
|
|
"depend on the build process for the specific version of Python being run; "
|
|
|
|
"the variables are those found in the :file:`Makefile` and configuration "
|
|
|
|
"header that are installed with Python on Unix systems. The configuration "
|
|
|
|
"header is called :file:`pyconfig.h` for Python versions starting with 2.2, "
|
|
|
|
"and :file:`config.h` for earlier versions of Python."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1434
|
|
|
|
msgid ""
|
|
|
|
"Some additional functions are provided which perform some useful "
|
|
|
|
"manipulations for other parts of the :mod:`distutils` package."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1440
|
|
|
|
msgid "The result of ``os.path.normpath(sys.prefix)``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1445
|
|
|
|
msgid "The result of ``os.path.normpath(sys.exec_prefix)``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1450
|
|
|
|
msgid ""
|
|
|
|
"Return the value of a single variable. This is equivalent to "
|
|
|
|
"``get_config_vars().get(name)``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1456
|
|
|
|
msgid ""
|
|
|
|
"Return a set of variable definitions. If there are no arguments, this "
|
|
|
|
"returns a dictionary mapping names of configuration variables to values. If "
|
|
|
|
"arguments are provided, they should be strings, and the return value will be "
|
|
|
|
"a sequence giving the associated values. If a given name does not have a "
|
|
|
|
"corresponding value, ``None`` will be included for that variable."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1465
|
|
|
|
msgid ""
|
|
|
|
"Return the full path name of the configuration header. For Unix, this will "
|
|
|
|
"be the header generated by the :program:`configure` script; for other "
|
|
|
|
"platforms the header will have been supplied directly by the Python source "
|
|
|
|
"distribution. The file is a platform-specific text file."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1473
|
|
|
|
msgid ""
|
|
|
|
"Return the full path name of the :file:`Makefile` used to build Python. For "
|
|
|
|
"Unix, this will be a file generated by the :program:`configure` script; the "
|
|
|
|
"meaning for other platforms will vary. The file is a platform-specific text "
|
|
|
|
"file, if it exists. This function is only useful on POSIX platforms."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1481
|
|
|
|
msgid ""
|
|
|
|
"Return the directory for either the general or platform-dependent C include "
|
|
|
|
"files. If *plat_specific* is true, the platform-dependent include directory "
|
|
|
|
"is returned; if false or omitted, the platform-independent directory is "
|
|
|
|
"returned. If *prefix* is given, it is used as either the prefix instead of :"
|
|
|
|
"const:`PREFIX`, or as the exec-prefix instead of :const:`EXEC_PREFIX` if "
|
|
|
|
"*plat_specific* is true."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1491
|
|
|
|
msgid ""
|
|
|
|
"Return the directory for either the general or platform-dependent library "
|
|
|
|
"installation. If *plat_specific* is true, the platform-dependent include "
|
|
|
|
"directory is returned; if false or omitted, the platform-independent "
|
|
|
|
"directory is returned. If *prefix* is given, it is used as either the "
|
|
|
|
"prefix instead of :const:`PREFIX`, or as the exec-prefix instead of :const:"
|
|
|
|
"`EXEC_PREFIX` if *plat_specific* is true. If *standard_lib* is true, the "
|
|
|
|
"directory for the standard library is returned rather than the directory for "
|
|
|
|
"the installation of third-party extensions."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1500
|
|
|
|
msgid ""
|
|
|
|
"The following function is only intended for use within the :mod:`distutils` "
|
|
|
|
"package."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1506
|
|
|
|
msgid ""
|
|
|
|
"Do any platform-specific customization of a :class:`distutils.ccompiler."
|
|
|
|
"CCompiler` instance."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1509
|
|
|
|
msgid ""
|
|
|
|
"This function is only needed on Unix at this time, but should be called "
|
|
|
|
"consistently to support forward-compatibility. It inserts the information "
|
|
|
|
"that varies across Unix flavors and is stored in Python's :file:`Makefile`. "
|
|
|
|
"This information includes the selected compiler, compiler and linker "
|
|
|
|
"options, and the extension used by the linker for shared objects."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1515
|
|
|
|
msgid ""
|
|
|
|
"This function is even more special-purpose, and should only be used from "
|
|
|
|
"Python's own build procedures."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1521
|
|
|
|
msgid ""
|
|
|
|
"Inform the :mod:`distutils.sysconfig` module that it is being used as part "
|
|
|
|
"of the build process for Python. This changes a lot of relative locations "
|
|
|
|
"for files, allowing them to be located in the build area rather than in an "
|
|
|
|
"installed Python."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1528
|
|
|
|
msgid ":mod:`distutils.text_file` --- The TextFile class"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1534
|
|
|
|
msgid ""
|
|
|
|
"This module provides the :class:`TextFile` class, which gives an interface "
|
|
|
|
"to text files that (optionally) takes care of stripping comments, ignoring "
|
|
|
|
"blank lines, and joining lines with backslashes."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1541
|
|
|
|
msgid ""
|
|
|
|
"This class provides a file-like object that takes care of all the things "
|
|
|
|
"you commonly want to do when processing a text file that has some line-by-"
|
|
|
|
"line syntax: strip comments (as long as ``#`` is your comment character), "
|
|
|
|
"skip blank lines, join adjacent lines by escaping the newline (ie. backslash "
|
|
|
|
"at end of line), strip leading and/or trailing whitespace. All of these are "
|
|
|
|
"optional and independently controllable."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1548
|
|
|
|
msgid ""
|
|
|
|
"The class provides a :meth:`warn` method so you can generate warning "
|
|
|
|
"messages that report physical line number, even if the logical line in "
|
|
|
|
"question spans multiple physical lines. Also provides :meth:`unreadline` "
|
|
|
|
"for implementing line-at-a-time lookahead."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1553
|
|
|
|
msgid ""
|
|
|
|
":class:`TextFile` instances are create with either *filename*, *file*, or "
|
|
|
|
"both. :exc:`RuntimeError` is raised if both are ``None``. *filename* should "
|
|
|
|
"be a string, and *file* a file object (or something that provides :meth:"
|
|
|
|
"`readline` and :meth:`close` methods). It is recommended that you supply "
|
|
|
|
"at least *filename*, so that :class:`TextFile` can include it in warning "
|
|
|
|
"messages. If *file* is not supplied, :class:`TextFile` creates its own "
|
|
|
|
"using the :func:`open` built-in function."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1561
|
|
|
|
msgid ""
|
|
|
|
"The options are all boolean, and affect the values returned by :meth:"
|
|
|
|
"`readline`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1566
|
|
|
|
msgid "option name"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1566
|
|
|
|
msgid "default"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "default"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1568
|
|
|
|
msgid "*strip_comments*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1568
|
|
|
|
msgid ""
|
|
|
|
"strip from ``'#'`` to end-of- line, as well as any whitespace leading up to "
|
|
|
|
"the ``'#'``\\ ---unless it is escaped by a backslash"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1568 ../Doc/distutils/apiref.rst:1577
|
|
|
|
#: ../Doc/distutils/apiref.rst:1582
|
|
|
|
msgid "true"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1574
|
|
|
|
msgid "*lstrip_ws*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1574
|
|
|
|
msgid "strip leading whitespace from each line before returning it"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1574 ../Doc/distutils/apiref.rst:1592
|
|
|
|
#: ../Doc/distutils/apiref.rst:1603
|
|
|
|
msgid "false"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1577
|
|
|
|
msgid "*rstrip_ws*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1577
|
|
|
|
msgid ""
|
|
|
|
"strip trailing whitespace (including line terminator!) from each line before "
|
|
|
|
"returning it."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1582
|
|
|
|
msgid "*skip_blanks*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1582
|
|
|
|
msgid ""
|
|
|
|
"skip lines that are empty \\*after\\* stripping comments and whitespace. "
|
|
|
|
"(If both lstrip_ws and rstrip_ws are false, then some lines may consist of "
|
|
|
|
"solely whitespace: these will \\*not\\* be skipped, even if *skip_blanks* is "
|
|
|
|
"true.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1592
|
|
|
|
msgid "*join_lines*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1592
|
|
|
|
msgid ""
|
|
|
|
"if a backslash is the last non-newline character on a line after stripping "
|
|
|
|
"comments and whitespace, join the following line to it to form one logical "
|
|
|
|
"line; if N consecutive lines end with a backslash, then N+1 physical lines "
|
|
|
|
"will be joined to form one logical line."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1603
|
|
|
|
msgid "*collapse_join*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1603
|
|
|
|
msgid ""
|
|
|
|
"strip leading whitespace from lines that are joined to their predecessor; "
|
|
|
|
"only matters if ``(join_lines and not lstrip_ws)``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1610
|
|
|
|
msgid ""
|
|
|
|
"Note that since *rstrip_ws* can strip the trailing newline, the semantics "
|
|
|
|
"of :meth:`readline` must differ from those of the built-in file object's :"
|
|
|
|
"meth:`readline` method! In particular, :meth:`readline` returns ``None`` "
|
|
|
|
"for end-of-file: an empty string might just be a blank line (or an all-"
|
|
|
|
"whitespace line), if *rstrip_ws* is true but *skip_blanks* is not."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1619
|
|
|
|
msgid ""
|
|
|
|
"Open a new file *filename*. This overrides any *file* or *filename* "
|
|
|
|
"constructor arguments."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1625
|
|
|
|
msgid ""
|
|
|
|
"Close the current file and forget everything we know about it (including the "
|
|
|
|
"filename and the current line number)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1631
|
|
|
|
msgid ""
|
|
|
|
"Print (to stderr) a warning message tied to the current logical line in the "
|
|
|
|
"current file. If the current logical line in the file spans multiple "
|
|
|
|
"physical lines, the warning refers to the whole range, such as ``\"lines "
|
|
|
|
"3-5\"``. If *line* is supplied, it overrides the current line number; it "
|
|
|
|
"may be a list or tuple to indicate a range of physical lines, or an integer "
|
|
|
|
"for a single physical line."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1641
|
|
|
|
msgid ""
|
|
|
|
"Read and return a single logical line from the current file (or from an "
|
|
|
|
"internal buffer if lines have previously been \"unread\" with :meth:"
|
|
|
|
"`unreadline`). If the *join_lines* option is true, this may involve "
|
|
|
|
"reading multiple physical lines concatenated into a single string. Updates "
|
|
|
|
"the current line number, so calling :meth:`warn` after :meth:`readline` "
|
|
|
|
"emits a warning about the physical line(s) just read. Returns ``None`` on "
|
|
|
|
"end-of-file, since the empty string can occur if *rstrip_ws* is true but "
|
|
|
|
"*strip_blanks* is not."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1652
|
|
|
|
msgid ""
|
|
|
|
"Read and return the list of all logical lines remaining in the current file. "
|
|
|
|
"This updates the current line number to the last line of the file."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1658
|
|
|
|
msgid ""
|
|
|
|
"Push *line* (a string) onto an internal buffer that will be checked by "
|
|
|
|
"future :meth:`readline` calls. Handy for implementing a parser with line-at-"
|
|
|
|
"a-time lookahead. Note that lines that are \"unread\" with :meth:"
|
|
|
|
"`unreadline` are not subsequently re-cleansed (whitespace stripped, or "
|
|
|
|
"whatever) when read with :meth:`readline`. If multiple calls are made to :"
|
|
|
|
"meth:`unreadline` before a call to :meth:`readline`, the lines will be "
|
|
|
|
"returned most in most recent first order."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1667
|
|
|
|
msgid ":mod:`distutils.version` --- Version number classes"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1682
|
|
|
|
msgid ":mod:`distutils.cmd` --- Abstract base class for Distutils commands"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1689
|
|
|
|
msgid "This module supplies the abstract base class :class:`Command`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1694
|
|
|
|
msgid ""
|
|
|
|
"Abstract base class for defining command classes, the \"worker bees\" of the "
|
|
|
|
"Distutils. A useful analogy for command classes is to think of them as "
|
|
|
|
"subroutines with local variables called *options*. The options are declared "
|
|
|
|
"in :meth:`initialize_options` and defined (given their final values) in :"
|
|
|
|
"meth:`finalize_options`, both of which must be defined by every command "
|
|
|
|
"class. The distinction between the two is necessary because option values "
|
|
|
|
"might come from the outside world (command line, config file, ...), and any "
|
|
|
|
"options dependent on other options must be computed after these outside "
|
|
|
|
"influences have been processed --- hence :meth:`finalize_options`. The body "
|
|
|
|
"of the subroutine, where it does all its work based on the values of its "
|
|
|
|
"options, is the :meth:`run` method, which must also be implemented by every "
|
|
|
|
"command class."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1707
|
|
|
|
msgid ""
|
|
|
|
"The class constructor takes a single argument *dist*, a :class:`~distutils."
|
|
|
|
"core.Distribution` instance."
|
|
|
|
msgstr ""
|
2016-10-17 19:46:02 +00:00
|
|
|
"Le constructeur prend un seul argument, *dist*, une instance de :class:"
|
|
|
|
"`~distutils.core.Distribution`."
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1712
|
|
|
|
msgid "Creating a new Distutils command"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1714
|
|
|
|
msgid "This section outlines the steps to create a new Distutils command."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1716
|
|
|
|
msgid ""
|
|
|
|
"A new command lives in a module in the :mod:`distutils.command` package. "
|
|
|
|
"There is a sample template in that directory called :file:"
|
|
|
|
"`command_template`. Copy this file to a new module with the same name as "
|
|
|
|
"the new command you're implementing. This module should implement a class "
|
|
|
|
"with the same name as the module (and the command). So, for instance, to "
|
|
|
|
"create the command ``peel_banana`` (so that users can run ``setup.py "
|
|
|
|
"peel_banana``), you'd copy :file:`command_template` to :file:`distutils/"
|
|
|
|
"command/peel_banana.py`, then edit it so that it's implementing the class :"
|
|
|
|
"class:`peel_banana`, a subclass of :class:`distutils.cmd.Command`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1726
|
|
|
|
msgid "Subclasses of :class:`Command` must define the following methods."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1730
|
|
|
|
msgid ""
|
|
|
|
"Set default values for all the options that this command supports. Note "
|
|
|
|
"that these defaults may be overridden by other commands, by the setup "
|
|
|
|
"script, by config files, or by the command-line. Thus, this is not the "
|
|
|
|
"place to code dependencies between options; generally, :meth:"
|
|
|
|
"`initialize_options` implementations are just a bunch of ``self.foo = None`` "
|
|
|
|
"assignments."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1739
|
|
|
|
msgid ""
|
|
|
|
"Set final values for all the options that this command supports. This is "
|
|
|
|
"always called as late as possible, ie. after any option assignments from "
|
|
|
|
"the command-line or from other commands have been done. Thus, this is the "
|
|
|
|
"place to code option dependencies: if *foo* depends on *bar*, then it is "
|
|
|
|
"safe to set *foo* from *bar* as long as *foo* still has the same value it "
|
|
|
|
"was assigned in :meth:`initialize_options`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1749
|
|
|
|
msgid ""
|
|
|
|
"A command's raison d'etre: carry out the action it exists to perform, "
|
|
|
|
"controlled by the options initialized in :meth:`initialize_options`, "
|
|
|
|
"customized by other commands, the setup script, the command-line, and config "
|
|
|
|
"files, and finalized in :meth:`finalize_options`. All terminal output and "
|
|
|
|
"filesystem interaction should be done by :meth:`run`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1758
|
|
|
|
msgid ""
|
|
|
|
"*sub_commands* formalizes the notion of a \"family\" of commands, e.g. "
|
|
|
|
"``install`` as the parent with sub-commands ``install_lib``, "
|
|
|
|
"``install_headers``, etc. The parent of a family of commands defines "
|
|
|
|
"*sub_commands* as a class attribute; it's a list of 2-tuples "
|
|
|
|
"``(command_name, predicate)``, with *command_name* a string and *predicate* "
|
|
|
|
"a function, a string or ``None``. *predicate* is a method of the parent "
|
|
|
|
"command that determines whether the corresponding command is applicable in "
|
|
|
|
"the current situation. (E.g. ``install_headers`` is only applicable if we "
|
|
|
|
"have any C header files to install.) If *predicate* is ``None``, that "
|
|
|
|
"command is always applicable."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1769
|
|
|
|
msgid ""
|
|
|
|
"*sub_commands* is usually defined at the *end* of a class, because "
|
|
|
|
"predicates can be methods of the class, so they must already have been "
|
|
|
|
"defined. The canonical example is the :command:`install` command."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1775
|
|
|
|
msgid ":mod:`distutils.command` --- Individual Distutils commands"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1786
|
|
|
|
msgid ":mod:`distutils.command.bdist` --- Build a binary installer"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1796
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.bdist_packager` --- Abstract base class for packagers"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1806
|
|
|
|
msgid ":mod:`distutils.command.bdist_dumb` --- Build a \"dumb\" installer"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1816
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.bdist_msi` --- Build a Microsoft Installer binary "
|
|
|
|
"package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1823
|
|
|
|
msgid "Builds a `Windows Installer`_ (.msi) binary package."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1827
|
|
|
|
msgid ""
|
|
|
|
"In most cases, the ``bdist_msi`` installer is a better choice than the "
|
|
|
|
"``bdist_wininst`` installer, because it provides better support for Win64 "
|
|
|
|
"platforms, allows administrators to perform non-interactive installations, "
|
|
|
|
"and allows installation through group policies."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1834
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.bdist_rpm` --- Build a binary distribution as a "
|
|
|
|
"Redhat RPM and SRPM"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1844
|
|
|
|
msgid ":mod:`distutils.command.bdist_wininst` --- Build a Windows installer"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1854
|
|
|
|
msgid ":mod:`distutils.command.sdist` --- Build a source distribution"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1864
|
|
|
|
msgid ":mod:`distutils.command.build` --- Build all files of a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1874
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.build_clib` --- Build any C libraries in a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1884
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.build_ext` --- Build any extensions in a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1894
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.build_py` --- Build the .py/.pyc files of a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1904
|
|
|
|
msgid ""
|
|
|
|
"Alternative implementation of build_py which also runs the 2to3 conversion "
|
|
|
|
"library on each .py file that is going to be installed. To use this in a "
|
|
|
|
"setup.py file for a distribution that is designed to run with both Python 2."
|
|
|
|
"x and 3.x, add::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1914
|
|
|
|
msgid "to your setup.py, and later::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1918
|
|
|
|
msgid "to the invocation of setup()."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1922
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.build_scripts` --- Build the scripts of a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1932
|
|
|
|
msgid ":mod:`distutils.command.clean` --- Clean a package build area"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1937
|
|
|
|
msgid ""
|
|
|
|
"This command removes the temporary files created by :command:`build` and its "
|
|
|
|
"subcommands, like intermediary compiled object files. With the ``--all`` "
|
|
|
|
"option, the complete build directory will be removed."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1941
|
|
|
|
msgid ""
|
|
|
|
"Extension modules built :ref:`in place <distutils-build-ext-inplace>` will "
|
|
|
|
"not be cleaned, as they are not in the build directory."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1946
|
|
|
|
msgid ":mod:`distutils.command.config` --- Perform package configuration"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1956
|
|
|
|
msgid ":mod:`distutils.command.install` --- Install a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1966
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.install_data` --- Install data files from a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1976
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.install_headers` --- Install C/C++ header files from "
|
|
|
|
"a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1986
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.install_lib` --- Install library files from a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:1996
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.install_scripts` --- Install script files from a "
|
|
|
|
"package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:2006
|
|
|
|
msgid ""
|
|
|
|
":mod:`distutils.command.register` --- Register a module with the Python "
|
|
|
|
"Package Index"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:2012
|
|
|
|
msgid ""
|
|
|
|
"The ``register`` command registers the package with the Python Package "
|
|
|
|
"Index. This is described in more detail in :pep:`301`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:2019
|
|
|
|
msgid ":mod:`distutils.command.check` --- Check the meta-data of a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/apiref.rst:2025
|
|
|
|
msgid ""
|
|
|
|
"The ``check`` command performs some tests on the meta-data of a package. For "
|
|
|
|
"example, it verifies that all required meta-data are provided as the "
|
|
|
|
"arguments passed to the :func:`setup` function."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:5
|
|
|
|
msgid "Creating Built Distributions"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:7
|
|
|
|
msgid ""
|
|
|
|
"A \"built distribution\" is what you're probably used to thinking of either "
|
|
|
|
"as a \"binary package\" or an \"installer\" (depending on your background). "
|
|
|
|
"It's not necessarily binary, though, because it might contain only Python "
|
|
|
|
"source code and/or byte-code; and we don't call it a package, because that "
|
|
|
|
"word is already spoken for in Python. (And \"installer\" is a term specific "
|
|
|
|
"to the world of mainstream desktop systems.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:14
|
|
|
|
msgid ""
|
|
|
|
"A built distribution is how you make life as easy as possible for installers "
|
|
|
|
"of your module distribution: for users of RPM-based Linux systems, it's a "
|
|
|
|
"binary RPM; for Windows users, it's an executable installer; for Debian-"
|
|
|
|
"based Linux users, it's a Debian package; and so forth. Obviously, no one "
|
|
|
|
"person will be able to create built distributions for every platform under "
|
|
|
|
"the sun, so the Distutils are designed to enable module developers to "
|
|
|
|
"concentrate on their specialty---writing code and creating source "
|
|
|
|
"distributions---while an intermediary species called *packagers* springs up "
|
|
|
|
"to turn source distributions into built distributions for as many platforms "
|
|
|
|
"as there are packagers."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:24
|
|
|
|
msgid ""
|
|
|
|
"Of course, the module developer could be his own packager; or the packager "
|
|
|
|
"could be a volunteer \"out there\" somewhere who has access to a platform "
|
|
|
|
"which the original developer does not; or it could be software periodically "
|
|
|
|
"grabbing new source distributions and turning them into built distributions "
|
|
|
|
"for as many platforms as the software has access to. Regardless of who they "
|
|
|
|
"are, a packager uses the setup script and the :command:`bdist` command "
|
|
|
|
"family to generate built distributions."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:32
|
|
|
|
msgid ""
|
|
|
|
"As a simple example, if I run the following command in the Distutils source "
|
|
|
|
"tree::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:37
|
|
|
|
msgid ""
|
|
|
|
"then the Distutils builds my module distribution (the Distutils itself in "
|
|
|
|
"this case), does a \"fake\" installation (also in the :file:`build` "
|
|
|
|
"directory), and creates the default type of built distribution for my "
|
|
|
|
"platform. The default format for built distributions is a \"dumb\" tar file "
|
|
|
|
"on Unix, and a simple executable installer on Windows. (That tar file is "
|
|
|
|
"considered \"dumb\" because it has to be unpacked in a specific location to "
|
|
|
|
"work.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:44
|
|
|
|
msgid ""
|
|
|
|
"Thus, the above command on a Unix system creates :file:`Distutils-1.0.{plat}."
|
|
|
|
"tar.gz`; unpacking this tarball from the right place installs the Distutils "
|
|
|
|
"just as though you had downloaded the source distribution and run ``python "
|
|
|
|
"setup.py install``. (The \"right place\" is either the root of the "
|
|
|
|
"filesystem or Python's :file:`{prefix}` directory, depending on the options "
|
|
|
|
"given to the :command:`bdist_dumb` command; the default is to make dumb "
|
|
|
|
"distributions relative to :file:`{prefix}`.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:52
|
|
|
|
msgid ""
|
|
|
|
"Obviously, for pure Python distributions, this isn't any simpler than just "
|
|
|
|
"running ``python setup.py install``\\ ---but for non-pure distributions, "
|
|
|
|
"which include extensions that would need to be compiled, it can mean the "
|
|
|
|
"difference between someone being able to use your extensions or not. And "
|
|
|
|
"creating \"smart\" built distributions, such as an RPM package or an "
|
|
|
|
"executable installer for Windows, is far more convenient for users even if "
|
|
|
|
"your distribution doesn't include any extensions."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:60
|
|
|
|
msgid ""
|
|
|
|
"The :command:`bdist` command has a :option:`--formats` option, similar to "
|
|
|
|
"the :command:`sdist` command, which you can use to select the types of built "
|
|
|
|
"distribution to generate: for example, ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:66
|
|
|
|
msgid ""
|
|
|
|
"would, when run on a Unix system, create :file:`Distutils-1.0.{plat}.zip`\\ "
|
|
|
|
"---again, this archive would be unpacked from the root directory to install "
|
|
|
|
"the Distutils."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:70
|
|
|
|
msgid "The available formats for built distributions are:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:73 ../Doc/distutils/sourcedist.rst:25
|
|
|
|
msgid "Format"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Format"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:73 ../Doc/distutils/commandref.rst:61
|
|
|
|
#: ../Doc/distutils/setupscript.rst:562 ../Doc/distutils/sourcedist.rst:25
|
|
|
|
msgid "Description"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Description"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:73 ../Doc/distutils/setupscript.rst:562
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:25
|
|
|
|
msgid "Notes"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Notes"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:75 ../Doc/distutils/sourcedist.rst:29
|
|
|
|
msgid "``gztar``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:75
|
|
|
|
msgid "gzipped tar file (:file:`.tar.gz`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:75 ../Doc/distutils/setupscript.rst:564
|
|
|
|
#: ../Doc/distutils/setupscript.rst:578
|
|
|
|
msgid "\\(1)"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "\\(1)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:78 ../Doc/distutils/sourcedist.rst:32
|
|
|
|
msgid "``bztar``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:78
|
|
|
|
msgid "bzipped tar file (:file:`.tar.bz2`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:81 ../Doc/distutils/sourcedist.rst:35
|
|
|
|
msgid "``xztar``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:81
|
|
|
|
msgid "xzipped tar file (:file:`.tar.xz`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:84 ../Doc/distutils/sourcedist.rst:38
|
|
|
|
msgid "``ztar``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:84 ../Doc/distutils/sourcedist.rst:38
|
|
|
|
msgid "compressed tar file (:file:`.tar.Z`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:84 ../Doc/distutils/setupscript.rst:568
|
|
|
|
#: ../Doc/distutils/setupscript.rst:570 ../Doc/distutils/setupscript.rst:573
|
|
|
|
#: ../Doc/distutils/setupscript.rst:575
|
|
|
|
msgid "\\(3)"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "\\(3)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:87 ../Doc/distutils/sourcedist.rst:41
|
|
|
|
msgid "``tar``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:87 ../Doc/distutils/sourcedist.rst:41
|
|
|
|
msgid "tar file (:file:`.tar`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:89 ../Doc/distutils/sourcedist.rst:27
|
|
|
|
msgid "``zip``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:89 ../Doc/distutils/sourcedist.rst:27
|
|
|
|
msgid "zip file (:file:`.zip`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:89
|
|
|
|
msgid "(2),(4)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:91
|
|
|
|
msgid "``rpm``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:91
|
|
|
|
msgid "RPM"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:91 ../Doc/distutils/setupscript.rst:584
|
|
|
|
msgid "\\(5)"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "\\(5)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:93
|
|
|
|
msgid "``pkgtool``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:93
|
|
|
|
msgid "Solaris :program:`pkgtool`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:95
|
|
|
|
msgid "``sdux``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:95
|
|
|
|
msgid "HP-UX :program:`swinstall`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:97
|
|
|
|
msgid "``wininst``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:97
|
|
|
|
msgid "self-extracting ZIP file for Windows"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:97 ../Doc/distutils/setupscript.rst:587
|
|
|
|
#: ../Doc/distutils/setupscript.rst:590 ../Doc/distutils/sourcedist.rst:38
|
|
|
|
msgid "\\(4)"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "\\(4)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:100
|
|
|
|
msgid "``msi``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:100
|
|
|
|
msgid "Microsoft Installer."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:107 ../Doc/distutils/setupscript.rst:597
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:47
|
|
|
|
msgid "Notes:"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Notes : "
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:110 ../Doc/distutils/sourcedist.rst:53
|
|
|
|
msgid "default on Unix"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:113 ../Doc/distutils/sourcedist.rst:50
|
|
|
|
msgid "default on Windows"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:116
|
|
|
|
msgid "requires external :program:`compress` utility."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:119 ../Doc/distutils/sourcedist.rst:56
|
|
|
|
msgid ""
|
|
|
|
"requires either external :program:`zip` utility or :mod:`zipfile` module "
|
|
|
|
"(part of the standard Python library since Python 1.6)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:123
|
|
|
|
msgid ""
|
|
|
|
"requires external :program:`rpm` utility, version 3.0.4 or better (use ``rpm "
|
|
|
|
"--version`` to find out which version you have)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:126
|
|
|
|
msgid ""
|
|
|
|
"You don't have to use the :command:`bdist` command with the :option:`--"
|
|
|
|
"formats` option; you can also use the command that directly implements the "
|
|
|
|
"format you're interested in. Some of these :command:`bdist` \"sub-commands"
|
|
|
|
"\" actually generate several similar formats; for instance, the :command:"
|
|
|
|
"`bdist_dumb` command generates all the \"dumb\" archive formats (``tar``, "
|
|
|
|
"``gztar``, ``bztar``, ``xztar``, ``ztar``, and ``zip``), and :command:"
|
|
|
|
"`bdist_rpm` generates both binary and source RPMs. The :command:`bdist` sub-"
|
|
|
|
"commands, and the formats generated by each, are:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:136 ../Doc/distutils/commandref.rst:61
|
|
|
|
msgid "Command"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:136
|
|
|
|
msgid "Formats"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Formats"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:138
|
|
|
|
msgid ":command:`bdist_dumb`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:138
|
|
|
|
msgid "tar, gztar, bztar, xztar, ztar, zip"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:140
|
|
|
|
msgid ":command:`bdist_rpm`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:140
|
|
|
|
msgid "rpm, srpm"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:142
|
|
|
|
msgid ":command:`bdist_wininst`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:142
|
|
|
|
msgid "wininst"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:144
|
|
|
|
msgid ":command:`bdist_msi`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:144
|
|
|
|
msgid "msi"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:147
|
|
|
|
msgid ""
|
|
|
|
"The following sections give details on the individual :command:`bdist_\\*` "
|
|
|
|
"commands."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:163
|
|
|
|
msgid "Creating RPM packages"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:165
|
|
|
|
msgid ""
|
|
|
|
"The RPM format is used by many popular Linux distributions, including Red "
|
|
|
|
"Hat, SuSE, and Mandrake. If one of these (or any of the other RPM-based "
|
|
|
|
"Linux distributions) is your usual environment, creating RPM packages for "
|
|
|
|
"other users of that same distribution is trivial. Depending on the "
|
|
|
|
"complexity of your module distribution and differences between Linux "
|
|
|
|
"distributions, you may also be able to create RPMs that work on different "
|
|
|
|
"RPM-based distributions."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:172
|
|
|
|
msgid ""
|
|
|
|
"The usual way to create an RPM of your module distribution is to run the :"
|
|
|
|
"command:`bdist_rpm` command::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:177
|
|
|
|
msgid "or the :command:`bdist` command with the :option:`--format` option::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:181
|
|
|
|
msgid ""
|
|
|
|
"The former allows you to specify RPM-specific options; the latter allows "
|
|
|
|
"you to easily specify multiple formats in one run. If you need to do both, "
|
|
|
|
"you can explicitly specify multiple :command:`bdist_\\*` commands and their "
|
|
|
|
"options::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:188
|
|
|
|
msgid ""
|
|
|
|
"Creating RPM packages is driven by a :file:`.spec` file, much as using the "
|
|
|
|
"Distutils is driven by the setup script. To make your life easier, the :"
|
|
|
|
"command:`bdist_rpm` command normally creates a :file:`.spec` file based on "
|
|
|
|
"the information you supply in the setup script, on the command line, and in "
|
|
|
|
"any Distutils configuration files. Various options and sections in the :"
|
|
|
|
"file:`.spec` file are derived from options in the setup script as follows:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:196 ../Doc/distutils/builtdist.rst:220
|
|
|
|
msgid "RPM :file:`.spec` file option or section"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:196
|
|
|
|
msgid "Distutils setup script option"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:198
|
|
|
|
msgid "Name"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Nom"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:198 ../Doc/distutils/setupscript.rst:564
|
|
|
|
msgid "``name``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:200
|
|
|
|
msgid "Summary (in preamble)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:200 ../Doc/distutils/setupscript.rst:580
|
|
|
|
msgid "``description``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:202
|
|
|
|
msgid "Version"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:202 ../Doc/distutils/setupscript.rst:566
|
|
|
|
msgid "``version``"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "``version``"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:204 ../Doc/distutils/builtdist.rst:227
|
|
|
|
msgid "Vendor"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:204
|
|
|
|
msgid ""
|
|
|
|
"``author`` and ``author_email``, or --- & ``maintainer`` and "
|
|
|
|
"``maintainer_email``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:208
|
|
|
|
msgid "Copyright"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Copyright"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:208 ../Doc/distutils/setupscript.rst:594
|
|
|
|
msgid "``license``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:210
|
|
|
|
msgid "Url"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:210 ../Doc/distutils/setupscript.rst:578
|
|
|
|
msgid "``url``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:212
|
|
|
|
msgid "%description (section)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:212 ../Doc/distutils/setupscript.rst:584
|
|
|
|
msgid "``long_description``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:215
|
|
|
|
msgid ""
|
|
|
|
"Additionally, there are many options in :file:`.spec` files that don't have "
|
|
|
|
"corresponding options in the setup script. Most of these are handled "
|
|
|
|
"through options to the :command:`bdist_rpm` command as follows:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:220
|
|
|
|
msgid ":command:`bdist_rpm` option"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:220
|
|
|
|
msgid "default value"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:223
|
|
|
|
msgid "Release"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Version"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:223
|
|
|
|
msgid "``release``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:223
|
|
|
|
msgid "\"1\""
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:225
|
|
|
|
msgid "Group"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:225
|
|
|
|
msgid "``group``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:225
|
|
|
|
msgid "\"Development/Libraries\""
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:227
|
|
|
|
msgid "``vendor``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:227
|
|
|
|
msgid "(see above)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:229
|
|
|
|
msgid "Packager"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:229
|
|
|
|
msgid "``packager``"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "``packager``"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:229 ../Doc/distutils/builtdist.rst:231
|
|
|
|
#: ../Doc/distutils/builtdist.rst:233 ../Doc/distutils/builtdist.rst:235
|
|
|
|
#: ../Doc/distutils/builtdist.rst:237 ../Doc/distutils/builtdist.rst:239
|
|
|
|
#: ../Doc/distutils/builtdist.rst:241 ../Doc/distutils/builtdist.rst:243
|
|
|
|
msgid "(none)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:231
|
|
|
|
msgid "Provides"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:231
|
|
|
|
msgid "``provides``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:233
|
|
|
|
msgid "Requires"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:233
|
|
|
|
msgid "``requires``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:235
|
|
|
|
msgid "Conflicts"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:235
|
|
|
|
msgid "``conflicts``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:237
|
|
|
|
msgid "Obsoletes"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:237
|
|
|
|
msgid "``obsoletes``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:239
|
|
|
|
msgid "Distribution"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:239
|
|
|
|
msgid "``distribution_name``"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "``distribution_name``"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:241
|
|
|
|
msgid "BuildRequires"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:241
|
|
|
|
msgid "``build_requires``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:243
|
|
|
|
msgid "Icon"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:243
|
|
|
|
msgid "``icon``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:246
|
|
|
|
msgid ""
|
|
|
|
"Obviously, supplying even a few of these options on the command-line would "
|
|
|
|
"be tedious and error-prone, so it's usually best to put them in the setup "
|
|
|
|
"configuration file, :file:`setup.cfg`\\ ---see section :ref:`setup-config`. "
|
|
|
|
"If you distribute or package many Python module distributions, you might "
|
|
|
|
"want to put options that apply to all of them in your personal Distutils "
|
|
|
|
"configuration file (:file:`~/.pydistutils.cfg`). If you want to temporarily "
|
|
|
|
"disable this file, you can pass the :option:`--no-user-cfg` option to :file:"
|
|
|
|
"`setup.py`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:254
|
|
|
|
msgid ""
|
|
|
|
"There are three steps to building a binary RPM package, all of which are "
|
|
|
|
"handled automatically by the Distutils:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:257
|
|
|
|
msgid ""
|
|
|
|
"create a :file:`.spec` file, which describes the package (analogous to the "
|
|
|
|
"Distutils setup script; in fact, much of the information in the setup "
|
|
|
|
"script winds up in the :file:`.spec` file)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:261
|
|
|
|
msgid "create the source RPM"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:263
|
|
|
|
msgid ""
|
|
|
|
"create the \"binary\" RPM (which may or may not contain binary code, "
|
|
|
|
"depending on whether your module distribution contains Python extensions)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:266
|
|
|
|
msgid ""
|
|
|
|
"Normally, RPM bundles the last two steps together; when you use the "
|
|
|
|
"Distutils, all three steps are typically bundled together."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:269
|
|
|
|
msgid ""
|
|
|
|
"If you wish, you can separate these three steps. You can use the :option:`--"
|
|
|
|
"spec-only` option to make :command:`bdist_rpm` just create the :file:`.spec` "
|
|
|
|
"file and exit; in this case, the :file:`.spec` file will be written to the "
|
|
|
|
"\"distribution directory\"---normally :file:`dist/`, but customizable with "
|
|
|
|
"the :option:`--dist-dir` option. (Normally, the :file:`.spec` file winds up "
|
|
|
|
"deep in the \"build tree,\" in a temporary directory created by :command:"
|
|
|
|
"`bdist_rpm`.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:297
|
|
|
|
msgid "Creating Windows Installers"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:299
|
|
|
|
msgid ""
|
|
|
|
"Executable installers are the natural format for binary distributions on "
|
|
|
|
"Windows. They display a nice graphical user interface, display some "
|
|
|
|
"information about the module distribution to be installed taken from the "
|
|
|
|
"metadata in the setup script, let the user select a few options, and start "
|
|
|
|
"or cancel the installation."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:305
|
|
|
|
msgid ""
|
|
|
|
"Since the metadata is taken from the setup script, creating Windows "
|
|
|
|
"installers is usually as easy as running::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:310
|
|
|
|
msgid "or the :command:`bdist` command with the :option:`--formats` option::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:314
|
|
|
|
msgid ""
|
|
|
|
"If you have a pure module distribution (only containing pure Python modules "
|
|
|
|
"and packages), the resulting installer will be version independent and have "
|
|
|
|
"a name like :file:`foo-1.0.win32.exe`. These installers can even be created "
|
|
|
|
"on Unix platforms or Mac OS X."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:319
|
|
|
|
msgid ""
|
|
|
|
"If you have a non-pure distribution, the extensions can only be created on a "
|
|
|
|
"Windows platform, and will be Python version dependent. The installer "
|
|
|
|
"filename will reflect this and now has the form :file:`foo-1.0.win32-py2.0."
|
|
|
|
"exe`. You have to create a separate installer for every Python version you "
|
|
|
|
"want to support."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:325
|
|
|
|
msgid ""
|
|
|
|
"The installer will try to compile pure modules into :term:`bytecode` after "
|
|
|
|
"installation on the target system in normal and optimizing mode. If you "
|
|
|
|
"don't want this to happen for some reason, you can run the :command:"
|
|
|
|
"`bdist_wininst` command with the :option:`--no-target-compile` and/or the :"
|
|
|
|
"option:`--no-target-optimize` option."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:331
|
|
|
|
msgid ""
|
|
|
|
"By default the installer will display the cool \"Python Powered\" logo when "
|
|
|
|
"it is run, but you can also supply your own 152x261 bitmap which must be a "
|
|
|
|
"Windows :file:`.bmp` file with the :option:`--bitmap` option."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:335
|
|
|
|
msgid ""
|
|
|
|
"The installer will also display a large title on the desktop background "
|
|
|
|
"window when it is run, which is constructed from the name of your "
|
|
|
|
"distribution and the version number. This can be changed to another text by "
|
|
|
|
"using the :option:`--title` option."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:340
|
|
|
|
msgid ""
|
|
|
|
"The installer file will be written to the \"distribution directory\" --- "
|
|
|
|
"normally :file:`dist/`, but customizable with the :option:`--dist-dir` "
|
|
|
|
"option."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:346
|
|
|
|
msgid "Cross-compiling on Windows"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:348
|
|
|
|
msgid ""
|
|
|
|
"Starting with Python 2.6, distutils is capable of cross-compiling between "
|
|
|
|
"Windows platforms. In practice, this means that with the correct tools "
|
|
|
|
"installed, you can use a 32bit version of Windows to create 64bit extensions "
|
|
|
|
"and vice-versa."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:353
|
|
|
|
msgid ""
|
|
|
|
"To build for an alternate platform, specify the :option:`--plat-name` option "
|
|
|
|
"to the build command. Valid values are currently 'win32', 'win-amd64' and "
|
|
|
|
"'win-ia64'. For example, on a 32bit version of Windows, you could execute::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:359
|
|
|
|
msgid ""
|
|
|
|
"to build a 64bit version of your extension. The Windows Installers also "
|
|
|
|
"support this option, so the command::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:364
|
|
|
|
msgid ""
|
|
|
|
"would create a 64bit installation executable on your 32bit version of "
|
|
|
|
"Windows."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:366
|
|
|
|
msgid ""
|
|
|
|
"To cross-compile, you must download the Python source code and cross-compile "
|
|
|
|
"Python itself for the platform you are targeting - it is not possible from a "
|
|
|
|
"binary installation of Python (as the .lib etc file for other platforms are "
|
|
|
|
"not included.) In practice, this means the user of a 32 bit operating "
|
|
|
|
"system will need to use Visual Studio 2008 to open the :file:`PCBuild/"
|
|
|
|
"PCbuild.sln` solution in the Python source tree and build the \"x64\" "
|
|
|
|
"configuration of the 'pythoncore' project before cross-compiling extensions "
|
|
|
|
"is possible."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:375
|
|
|
|
msgid ""
|
|
|
|
"Note that by default, Visual Studio 2008 does not install 64bit compilers or "
|
|
|
|
"tools. You may need to reexecute the Visual Studio setup process and select "
|
|
|
|
"these tools (using Control Panel->[Add/Remove] Programs is a convenient way "
|
|
|
|
"to check or modify your existing install.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:383
|
|
|
|
msgid "The Postinstallation script"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:385
|
|
|
|
msgid ""
|
|
|
|
"Starting with Python 2.3, a postinstallation script can be specified with "
|
|
|
|
"the :option:`--install-script` option. The basename of the script must be "
|
|
|
|
"specified, and the script filename must also be listed in the scripts "
|
|
|
|
"argument to the setup function."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:390
|
|
|
|
msgid ""
|
|
|
|
"This script will be run at installation time on the target system after all "
|
|
|
|
"the files have been copied, with ``argv[1]`` set to :option:`-install`, and "
|
|
|
|
"again at uninstallation time before the files are removed with ``argv[1]`` "
|
|
|
|
"set to :option:`-remove`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:395
|
|
|
|
msgid ""
|
|
|
|
"The installation script runs embedded in the windows installer, every output "
|
|
|
|
"(``sys.stdout``, ``sys.stderr``) is redirected into a buffer and will be "
|
|
|
|
"displayed in the GUI after the script has finished."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:399
|
|
|
|
msgid ""
|
|
|
|
"Some functions especially useful in this context are available as additional "
|
|
|
|
"built-in functions in the installation script."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:406
|
|
|
|
msgid ""
|
|
|
|
"These functions should be called when a directory or file is created by the "
|
|
|
|
"postinstall script at installation time. It will register *path* with the "
|
|
|
|
"uninstaller, so that it will be removed when the distribution is "
|
|
|
|
"uninstalled. To be safe, directories are only removed if they are empty."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:414
|
|
|
|
msgid ""
|
|
|
|
"This function can be used to retrieve special folder locations on Windows "
|
|
|
|
"like the Start Menu or the Desktop. It returns the full path to the folder. "
|
|
|
|
"*csidl_string* must be one of the following strings::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:434
|
|
|
|
msgid "If the folder cannot be retrieved, :exc:`OSError` is raised."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:436
|
|
|
|
msgid ""
|
|
|
|
"Which folders are available depends on the exact Windows version, and "
|
|
|
|
"probably also the configuration. For details refer to Microsoft's "
|
|
|
|
"documentation of the :c:func:`SHGetSpecialFolderPath` function."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:443
|
|
|
|
msgid ""
|
|
|
|
"This function creates a shortcut. *target* is the path to the program to be "
|
|
|
|
"started by the shortcut. *description* is the description of the shortcut. "
|
|
|
|
"*filename* is the title of the shortcut that the user will see. *arguments* "
|
|
|
|
"specifies the command line arguments, if any. *workdir* is the working "
|
|
|
|
"directory for the program. *iconpath* is the file containing the icon for "
|
|
|
|
"the shortcut, and *iconindex* is the index of the icon in the file "
|
|
|
|
"*iconpath*. Again, for details consult the Microsoft documentation for the :"
|
|
|
|
"class:`IShellLink` interface."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:454
|
|
|
|
msgid "Vista User Access Control (UAC)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/builtdist.rst:456
|
|
|
|
msgid ""
|
|
|
|
"Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-"
|
|
|
|
"control` option. The default is 'none' (meaning no UAC handling is done), "
|
|
|
|
"and other valid values are 'auto' (meaning prompt for UAC elevation if "
|
|
|
|
"Python was installed for all users) and 'force' (meaning always prompt for "
|
|
|
|
"elevation)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:5
|
|
|
|
msgid "Command Reference"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:22
|
|
|
|
msgid "Installing modules: the :command:`install` command family"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:24
|
|
|
|
msgid ""
|
|
|
|
"The install command ensures that the build commands have been run and then "
|
|
|
|
"runs the subcommands :command:`install_lib`, :command:`install_data` and :"
|
|
|
|
"command:`install_scripts`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:35
|
|
|
|
msgid ":command:`install_data`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:37
|
|
|
|
msgid "This command installs all data files provided with the distribution."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:43
|
|
|
|
msgid ":command:`install_scripts`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:45
|
|
|
|
msgid "This command installs all (Python) scripts in the distribution."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:54
|
|
|
|
msgid "Creating a source distribution: the :command:`sdist` command"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:58
|
|
|
|
msgid "The manifest template commands are:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:63
|
|
|
|
msgid ":command:`include pat1 pat2 ...`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:63
|
|
|
|
msgid "include all files matching any of the listed patterns"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:66
|
|
|
|
msgid ":command:`exclude pat1 pat2 ...`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:66
|
|
|
|
msgid "exclude all files matching any of the listed patterns"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:69
|
|
|
|
msgid ":command:`recursive-include dir pat1 pat2 ...`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:69
|
|
|
|
msgid "include all files under *dir* matching any of the listed patterns"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:72
|
|
|
|
msgid ":command:`recursive-exclude dir pat1 pat2 ...`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:72
|
|
|
|
msgid "exclude all files under *dir* matching any of the listed patterns"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:75
|
|
|
|
msgid ":command:`global-include pat1 pat2 ...`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:75
|
|
|
|
msgid ""
|
|
|
|
"include all files anywhere in the source tree matching --- & any of the "
|
|
|
|
"listed patterns"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:78
|
|
|
|
msgid ":command:`global-exclude pat1 pat2 ...`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:78
|
|
|
|
msgid ""
|
|
|
|
"exclude all files anywhere in the source tree matching --- & any of the "
|
|
|
|
"listed patterns"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:81
|
|
|
|
msgid ":command:`prune dir`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:81
|
|
|
|
msgid "exclude all files under *dir*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:83
|
|
|
|
msgid ":command:`graft dir`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:83
|
|
|
|
msgid "include all files under *dir*"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/commandref.rst:86
|
|
|
|
msgid ""
|
|
|
|
"The patterns here are Unix-style \"glob\" patterns: ``*`` matches any "
|
|
|
|
"sequence of regular filename characters, ``?`` matches any single regular "
|
|
|
|
"filename character, and ``[range]`` matches any of the characters in *range* "
|
|
|
|
"(e.g., ``a-z``, ``a-zA-Z``, ``a-f0-9_.``). The definition of \"regular "
|
|
|
|
"filename character\" is platform-specific: on Unix it is anything except "
|
|
|
|
"slash; on Windows anything except backslash or colon."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:5
|
|
|
|
msgid "Writing the Setup Configuration File"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:7
|
|
|
|
msgid ""
|
|
|
|
"Often, it's not possible to write down everything needed to build a "
|
|
|
|
"distribution *a priori*: you may need to get some information from the user, "
|
|
|
|
"or from the user's system, in order to proceed. As long as that information "
|
|
|
|
"is fairly simple---a list of directories to search for C header files or "
|
|
|
|
"libraries, for example---then providing a configuration file, :file:`setup."
|
|
|
|
"cfg`, for users to edit is a cheap and easy way to solicit it. "
|
|
|
|
"Configuration files also let you provide default values for any command "
|
|
|
|
"option, which the installer can then override either on the command-line or "
|
|
|
|
"by editing the config file."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:16
|
|
|
|
msgid ""
|
|
|
|
"The setup configuration file is a useful middle-ground between the setup "
|
|
|
|
"script ---which, ideally, would be opaque to installers [#]_---and the "
|
|
|
|
"command-line to the setup script, which is outside of your control and "
|
|
|
|
"entirely up to the installer. In fact, :file:`setup.cfg` (and any other "
|
|
|
|
"Distutils configuration files present on the target system) are processed "
|
|
|
|
"after the contents of the setup script, but before the command-line. This "
|
|
|
|
"has several useful consequences:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:30
|
|
|
|
msgid ""
|
|
|
|
"installers can override some of what you put in :file:`setup.py` by editing :"
|
|
|
|
"file:`setup.cfg`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:33
|
|
|
|
msgid ""
|
|
|
|
"you can provide non-standard defaults for options that are not easily set "
|
|
|
|
"in :file:`setup.py`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:36
|
|
|
|
msgid ""
|
|
|
|
"installers can override anything in :file:`setup.cfg` using the command-line "
|
|
|
|
"options to :file:`setup.py`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:39
|
|
|
|
msgid "The basic syntax of the configuration file is simple::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:45
|
|
|
|
msgid ""
|
|
|
|
"where *command* is one of the Distutils commands (e.g. :command:`build_py`, :"
|
|
|
|
"command:`install`), and *option* is one of the options that command "
|
|
|
|
"supports. Any number of options can be supplied for each command, and any "
|
|
|
|
"number of command sections can be included in the file. Blank lines are "
|
|
|
|
"ignored, as are comments, which run from a ``'#'`` character until the end "
|
|
|
|
"of the line. Long option values can be split across multiple lines simply "
|
|
|
|
"by indenting the continuation lines."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:53
|
|
|
|
msgid ""
|
|
|
|
"You can find out the list of options supported by a particular command with "
|
|
|
|
"the universal :option:`!--help` option, e.g. ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:69
|
|
|
|
msgid ""
|
|
|
|
"Note that an option spelled :option:`--foo-bar` on the command-line is "
|
|
|
|
"spelled ``foo_bar`` in configuration files."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:74
|
|
|
|
msgid ""
|
|
|
|
"For example, say you want your extensions to be built \"in-place\"---that "
|
|
|
|
"is, you have an extension :mod:`pkg.ext`, and you want the compiled "
|
|
|
|
"extension file (:file:`ext.so` on Unix, say) to be put in the same source "
|
|
|
|
"directory as your pure Python modules :mod:`pkg.mod1` and :mod:`pkg.mod2`. "
|
|
|
|
"You can always use the :option:`--inplace` option on the command-line to "
|
|
|
|
"ensure this::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:82
|
|
|
|
msgid ""
|
|
|
|
"But this requires that you always specify the :command:`build_ext` command "
|
|
|
|
"explicitly, and remember to provide :option:`--inplace`. An easier way is to "
|
|
|
|
"\"set and forget\" this option, by encoding it in :file:`setup.cfg`, the "
|
|
|
|
"configuration file for this distribution::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:90
|
|
|
|
msgid ""
|
|
|
|
"This will affect all builds of this module distribution, whether or not you "
|
|
|
|
"explicitly specify :command:`build_ext`. If you include :file:`setup.cfg` "
|
|
|
|
"in your source distribution, it will also affect end-user builds---which is "
|
|
|
|
"probably a bad idea for this option, since always building extensions in-"
|
|
|
|
"place would break installation of the module distribution. In certain "
|
|
|
|
"peculiar cases, though, modules are built right in their installation "
|
|
|
|
"directory, so this is conceivably a useful ability. (Distributing "
|
|
|
|
"extensions that expect to be built in their installation directory is almost "
|
|
|
|
"always a bad idea, though.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:99
|
|
|
|
msgid ""
|
|
|
|
"Another example: certain commands take a lot of options that don't change "
|
|
|
|
"from run to run; for example, :command:`bdist_rpm` needs to know everything "
|
|
|
|
"required to generate a \"spec\" file for creating an RPM distribution. Some "
|
|
|
|
"of this information comes from the setup script, and some is automatically "
|
|
|
|
"generated by the Distutils (such as the list of files installed). But some "
|
|
|
|
"of it has to be supplied as options to :command:`bdist_rpm`, which would be "
|
|
|
|
"very tedious to do on the command-line for every run. Hence, here is a "
|
|
|
|
"snippet from the Distutils' own :file:`setup.cfg`::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:117
|
|
|
|
msgid ""
|
|
|
|
"Note that the ``doc_files`` option is simply a whitespace-separated string "
|
|
|
|
"split across multiple lines for readability."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:124
|
|
|
|
msgid ":ref:`inst-config-syntax` in \"Installing Python Modules\""
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:124
|
|
|
|
msgid ""
|
|
|
|
"More information on the configuration files is available in the manual for "
|
|
|
|
"system administrators."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:129
|
|
|
|
msgid "Footnotes"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Notes"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/configfile.rst:130
|
|
|
|
msgid ""
|
|
|
|
"This ideal probably won't be achieved until auto-configuration is fully "
|
|
|
|
"supported by the Distutils."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:5
|
|
|
|
msgid "Examples"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Exemples"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:7
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:14
|
|
|
|
msgid "`Distutils Cookbook <https://wiki.python.org/moin/Distutils/Cookbook>`_"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:15
|
|
|
|
msgid ""
|
|
|
|
"Collection of recipes showing how to achieve more control over distutils."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:21
|
|
|
|
msgid "Pure Python distribution (by module)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:23
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:27
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:34
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:43
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:49
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:58
|
|
|
|
msgid "and the setup script might be ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:66
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:74
|
|
|
|
msgid "Pure Python distribution (by package)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:76
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:83
|
|
|
|
msgid "The setup script from the last example could also be written as ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:91
|
|
|
|
msgid "(The empty string stands for the root package.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:93
|
|
|
|
msgid ""
|
|
|
|
"If those two files are moved into a subdirectory, but remain in the root "
|
|
|
|
"package, e.g.::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:101
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:111
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:123
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:132
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:143
|
|
|
|
msgid "an appropriate setup script would be ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:152
|
|
|
|
msgid ""
|
|
|
|
"Or, you might put modules from your main package right in the distribution "
|
|
|
|
"root::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:161
|
|
|
|
msgid "in which case your setup script would be ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:170
|
|
|
|
msgid "(The empty string also stands for the current directory.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:172
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:188
|
|
|
|
msgid "then the corresponding setup script would be ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:200
|
|
|
|
msgid "Single extension module"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:202
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:211
|
|
|
|
msgid ""
|
|
|
|
"If the :mod:`foo` extension belongs in the root package, the setup script "
|
|
|
|
"for this could be ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:221
|
|
|
|
msgid "If the extension actually belongs in a package, say :mod:`foopkg`, then"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:223
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:234
|
|
|
|
msgid "Checking a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:236
|
|
|
|
msgid ""
|
|
|
|
"The ``check`` command allows you to verify if your package meta-data meet "
|
|
|
|
"the minimum requirements to build a distribution."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:239
|
|
|
|
msgid ""
|
|
|
|
"To run it, just call it using your :file:`setup.py` script. If something is "
|
|
|
|
"missing, ``check`` will display a warning."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:242
|
|
|
|
msgid "Let's take an example with a simple script::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:248
|
|
|
|
msgid "Running the ``check`` command will display some warnings:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:259
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:263
|
|
|
|
msgid "For example, if the :file:`setup.py` script is changed like this::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:278
|
|
|
|
msgid ""
|
|
|
|
"Where the long description is broken, ``check`` will be able to detect it by "
|
|
|
|
"using the :mod:`docutils` parser:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:289
|
|
|
|
msgid "Reading the metadata"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:291
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:300
|
|
|
|
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 ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:310
|
|
|
|
msgid ""
|
|
|
|
"You can read back this static file, by using the :class:`distutils.dist."
|
|
|
|
"DistributionMetadata` class and its :func:`read_pkg_file` method::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/examples.rst:324
|
|
|
|
msgid ""
|
|
|
|
"Notice that the class can also be instanciated with a metadata file path to "
|
|
|
|
"loads its values::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:5
|
|
|
|
msgid "Extending Distutils"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:7
|
|
|
|
msgid ""
|
|
|
|
"Distutils can be extended in various ways. Most extensions take the form of "
|
|
|
|
"new commands or replacements for existing commands. New commands may be "
|
|
|
|
"written to support new types of platform-specific packaging, for example, "
|
|
|
|
"while replacements for existing commands may be made to modify details of "
|
|
|
|
"how the command operates on a package."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:13
|
|
|
|
msgid ""
|
|
|
|
"Most extensions of the distutils are made within :file:`setup.py` scripts "
|
|
|
|
"that want to modify existing commands; many simply add a few file extensions "
|
|
|
|
"that should be copied into packages in addition to :file:`.py` files as a "
|
|
|
|
"convenience."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:18
|
|
|
|
msgid ""
|
|
|
|
"Most distutils command implementations are subclasses of the :class:"
|
|
|
|
"`distutils.cmd.Command` class. New commands may directly inherit from :"
|
|
|
|
"class:`Command`, while replacements often derive from :class:`Command` "
|
|
|
|
"indirectly, directly subclassing the command they are replacing. Commands "
|
|
|
|
"are required to derive from :class:`Command`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:33
|
|
|
|
msgid "Integrating new commands"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:35
|
|
|
|
msgid ""
|
|
|
|
"There are different ways to integrate new command implementations into "
|
|
|
|
"distutils. The most difficult is to lobby for the inclusion of the new "
|
|
|
|
"features in distutils itself, and wait for (and require) a version of Python "
|
|
|
|
"that provides that support. This is really hard for many reasons."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:40
|
|
|
|
msgid ""
|
|
|
|
"The most common, and possibly the most reasonable for most needs, is to "
|
|
|
|
"include the new implementations with your :file:`setup.py` script, and cause "
|
|
|
|
"the :func:`distutils.core.setup` function use them::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:55
|
|
|
|
msgid ""
|
|
|
|
"This approach is most valuable if the new implementations must be used to "
|
|
|
|
"use a particular package, as everyone interested in the package will need to "
|
|
|
|
"have the new command implementation."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:59
|
|
|
|
msgid ""
|
|
|
|
"Beginning with Python 2.4, a third option is available, intended to allow "
|
|
|
|
"new commands to be added which can support existing :file:`setup.py` scripts "
|
|
|
|
"without requiring modifications to the Python installation. This is "
|
|
|
|
"expected to allow third-party extensions to provide support for additional "
|
|
|
|
"packaging systems, but the commands can be used for anything distutils "
|
|
|
|
"commands can be used for. A new configuration option, ``command_packages`` "
|
|
|
|
"(command-line option :option:`--command-packages`), can be used to specify "
|
|
|
|
"additional packages to be searched for modules implementing commands. Like "
|
|
|
|
"all distutils options, this can be specified on the command line or in a "
|
|
|
|
"configuration file. This option can only be set in the ``[global]`` section "
|
|
|
|
"of a configuration file, or before any commands on the command line. If set "
|
|
|
|
"in a configuration file, it can be overridden from the command line; setting "
|
|
|
|
"it to an empty string on the command line causes the default to be used. "
|
|
|
|
"This should never be set in a configuration file provided with a package."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:74
|
|
|
|
msgid ""
|
|
|
|
"This new option can be used to add any number of packages to the list of "
|
|
|
|
"packages searched for command implementations; multiple package names should "
|
|
|
|
"be separated by commas. When not specified, the search is only performed in "
|
|
|
|
"the :mod:`distutils.command` package. When :file:`setup.py` is run with the "
|
|
|
|
"option ``--command-packages distcmds,buildcmds``, however, the packages :mod:"
|
|
|
|
"`distutils.command`, :mod:`distcmds`, and :mod:`buildcmds` will be searched "
|
|
|
|
"in that order. New commands are expected to be implemented in modules of "
|
|
|
|
"the same name as the command by classes sharing the same name. Given the "
|
|
|
|
"example command line option above, the command :command:`bdist_openpkg` "
|
|
|
|
"could be implemented by the class :class:`distcmds.bdist_openpkg."
|
|
|
|
"bdist_openpkg` or :class:`buildcmds.bdist_openpkg.bdist_openpkg`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:88
|
|
|
|
msgid "Adding new distribution types"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/extending.rst:90
|
|
|
|
msgid ""
|
|
|
|
"Commands that create distributions (files in the :file:`dist/` directory) "
|
|
|
|
"need to add ``(command, filename)`` pairs to ``self.distribution."
|
|
|
|
"dist_files`` so that :command:`upload` can upload it to PyPI. The "
|
|
|
|
"*filename* in the pair contains no path information, only the name of the "
|
|
|
|
"file itself. In dry-run mode, pairs should still be added to represent what "
|
|
|
|
"would have been created."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/index.rst:5
|
|
|
|
msgid "Distributing Python Modules (Legacy version)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/index.rst:7
|
|
|
|
msgid "Greg Ward, Anthony Baxter"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/index.rst:8
|
|
|
|
msgid "distutils-sig@python.org"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "distutils-sig@python.org"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/index.rst:12
|
|
|
|
msgid ":ref:`distributing-index`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/index.rst:13
|
|
|
|
msgid "The up to date module distribution documentations"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/index.rst:15
|
|
|
|
msgid ""
|
|
|
|
"This document describes the Python Distribution Utilities (\"Distutils\") "
|
|
|
|
"from the module developer's point of view, describing how to use the "
|
|
|
|
"Distutils to make Python modules and extensions easily available to a wider "
|
|
|
|
"audience with very little overhead for build/release/install mechanics."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/index.rst:22
|
|
|
|
msgid ""
|
|
|
|
"This guide only covers the basic tools for building and distributing "
|
|
|
|
"extensions that are provided as part of this version of Python. Third party "
|
|
|
|
"tools offer easier to use and more secure alternatives. Refer to the `quick "
|
|
|
|
"recommendations section <https://packaging.python.org/en/latest/current/>`__ "
|
|
|
|
"in the Python Packaging User Guide for more information."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:5
|
|
|
|
msgid "An Introduction to Distutils"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:7
|
|
|
|
msgid ""
|
|
|
|
"This document covers using the Distutils to distribute your Python modules, "
|
|
|
|
"concentrating on the role of developer/distributor: if you're looking for "
|
|
|
|
"information on installing Python modules, you should refer to the :ref:"
|
|
|
|
"`install-index` chapter."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:16
|
|
|
|
msgid "Concepts & Terminology"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:18
|
|
|
|
msgid ""
|
|
|
|
"Using the Distutils is quite simple, both for module developers and for "
|
|
|
|
"users/administrators installing third-party modules. As a developer, your "
|
|
|
|
"responsibilities (apart from writing solid, well-documented and well-tested "
|
|
|
|
"code, of course!) are:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:23
|
|
|
|
msgid "write a setup script (:file:`setup.py` by convention)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:25
|
|
|
|
msgid "(optional) write a setup configuration file"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:27
|
|
|
|
msgid "create a source distribution"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:29
|
|
|
|
msgid "(optional) create one or more built (binary) distributions"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:31
|
|
|
|
msgid "Each of these tasks is covered in this document."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:33
|
|
|
|
msgid ""
|
|
|
|
"Not all module developers have access to a multitude of platforms, so it's "
|
|
|
|
"not always feasible to expect them to create a multitude of built "
|
|
|
|
"distributions. It is hoped that a class of intermediaries, called "
|
|
|
|
"*packagers*, will arise to address this need. Packagers will take source "
|
|
|
|
"distributions released by module developers, build them on one or more "
|
|
|
|
"platforms, and release the resulting built distributions. Thus, users on "
|
|
|
|
"the most popular platforms will be able to install most popular Python "
|
|
|
|
"module distributions in the most natural way for their platform, without "
|
|
|
|
"having to run a single setup script or compile a line of code."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:47
|
|
|
|
msgid "A Simple Example"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Un exemple simple"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:49
|
|
|
|
msgid ""
|
|
|
|
"The setup script is usually quite simple, although since it's written in "
|
|
|
|
"Python, there are no arbitrary limits to what you can do with it, though you "
|
|
|
|
"should be careful about putting arbitrarily expensive operations in your "
|
|
|
|
"setup script. Unlike, say, Autoconf-style configure scripts, the setup "
|
|
|
|
"script may be run multiple times in the course of building and installing "
|
|
|
|
"your module distribution."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:56
|
|
|
|
msgid ""
|
|
|
|
"If all you want to do is distribute a module called :mod:`foo`, contained in "
|
|
|
|
"a file :file:`foo.py`, then your setup script can be as simple as this::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:65
|
|
|
|
msgid "Some observations:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:67
|
|
|
|
msgid ""
|
|
|
|
"most information that you supply to the Distutils is supplied as keyword "
|
|
|
|
"arguments to the :func:`setup` function"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:70
|
|
|
|
msgid ""
|
|
|
|
"those keyword arguments fall into two categories: package metadata (name, "
|
|
|
|
"version number) and information about what's in the package (a list of pure "
|
|
|
|
"Python modules, in this case)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:74
|
|
|
|
msgid ""
|
|
|
|
"modules are specified by module name, not filename (the same will hold true "
|
|
|
|
"for packages and extensions)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:77
|
|
|
|
msgid ""
|
|
|
|
"it's recommended that you supply a little more metadata, in particular your "
|
|
|
|
"name, email address and a URL for the project (see section :ref:`setup-"
|
|
|
|
"script` for an example)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:81
|
|
|
|
msgid ""
|
|
|
|
"To create a source distribution for this module, you would create a setup "
|
|
|
|
"script, :file:`setup.py`, containing the above code, and run this command "
|
|
|
|
"from a terminal::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:87
|
|
|
|
msgid ""
|
|
|
|
"For Windows, open a command prompt window (:menuselection:`Start --> "
|
|
|
|
"Accessories`) and change the command to::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:92
|
|
|
|
msgid ""
|
|
|
|
":command:`sdist` will create an archive file (e.g., tarball on Unix, ZIP "
|
|
|
|
"file on Windows) containing your setup script :file:`setup.py`, and your "
|
|
|
|
"module :file:`foo.py`. The archive file will be named :file:`foo-1.0.tar.gz` "
|
|
|
|
"(or :file:`.zip`), and will unpack into a directory :file:`foo-1.0`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:97
|
|
|
|
msgid ""
|
|
|
|
"If an end-user wishes to install your :mod:`foo` module, all she has to do "
|
|
|
|
"is download :file:`foo-1.0.tar.gz` (or :file:`.zip`), unpack it, and---from "
|
|
|
|
"the :file:`foo-1.0` directory---run ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:103
|
|
|
|
msgid ""
|
|
|
|
"which will ultimately copy :file:`foo.py` to the appropriate directory for "
|
|
|
|
"third-party modules in their Python installation."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:106
|
|
|
|
msgid ""
|
|
|
|
"This simple example demonstrates some fundamental concepts of the Distutils. "
|
|
|
|
"First, both developers and installers have the same basic user interface, i."
|
|
|
|
"e. the setup script. The difference is which Distutils *commands* they use: "
|
|
|
|
"the :command:`sdist` command is almost exclusively for module developers, "
|
|
|
|
"while :command:`install` is more often for installers (although most "
|
|
|
|
"developers will want to install their own code occasionally)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:113
|
|
|
|
msgid ""
|
|
|
|
"If you want to make things really easy for your users, you can create one or "
|
|
|
|
"more built distributions for them. For instance, if you are running on a "
|
|
|
|
"Windows machine, and want to make things easy for other Windows users, you "
|
|
|
|
"can create an executable installer (the most appropriate type of built "
|
|
|
|
"distribution for this platform) with the :command:`bdist_wininst` command. "
|
|
|
|
"For example::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:121
|
|
|
|
msgid ""
|
|
|
|
"will create an executable installer, :file:`foo-1.0.win32.exe`, in the "
|
|
|
|
"current directory."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:124
|
|
|
|
msgid ""
|
|
|
|
"Other useful built distribution formats are RPM, implemented by the :command:"
|
|
|
|
"`bdist_rpm` command, Solaris :program:`pkgtool` (:command:`bdist_pkgtool`), "
|
|
|
|
"and HP-UX :program:`swinstall` (:command:`bdist_sdux`). For example, the "
|
|
|
|
"following command will create an RPM file called :file:`foo-1.0.noarch.rpm`::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:132
|
|
|
|
msgid ""
|
|
|
|
"(The :command:`bdist_rpm` command uses the :command:`rpm` executable, "
|
|
|
|
"therefore this has to be run on an RPM-based system such as Red Hat Linux, "
|
|
|
|
"SuSE Linux, or Mandrake Linux.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:136
|
|
|
|
msgid ""
|
|
|
|
"You can find out what distribution formats are available at any time by "
|
|
|
|
"running ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:145
|
|
|
|
msgid "General Python terminology"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:147
|
|
|
|
msgid ""
|
|
|
|
"If you're reading this document, you probably have a good idea of what "
|
|
|
|
"modules, extensions, and so forth are. Nevertheless, just to be sure that "
|
|
|
|
"everyone is operating from a common starting point, we offer the following "
|
|
|
|
"glossary of common Python terms:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:155
|
|
|
|
msgid "module"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "module"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:153
|
|
|
|
msgid ""
|
|
|
|
"the basic unit of code reusability in Python: a block of code imported by "
|
|
|
|
"some other code. Three types of modules concern us here: pure Python "
|
|
|
|
"modules, extension modules, and packages."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:160
|
|
|
|
msgid "pure Python module"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:158
|
|
|
|
msgid ""
|
|
|
|
"a module written in Python and contained in a single :file:`.py` file (and "
|
|
|
|
"possibly associated :file:`.pyc` files). Sometimes referred to as a \"pure "
|
|
|
|
"module.\""
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:168
|
|
|
|
msgid "extension module"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "module d'extension"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:163
|
|
|
|
msgid ""
|
|
|
|
"a module written in the low-level language of the Python implementation: C/C+"
|
|
|
|
"+ for Python, Java for Jython. Typically contained in a single dynamically "
|
|
|
|
"loadable pre-compiled file, e.g. a shared object (:file:`.so`) file for "
|
|
|
|
"Python extensions on Unix, a DLL (given the :file:`.pyd` extension) for "
|
|
|
|
"Python extensions on Windows, or a Java class file for Jython extensions. "
|
|
|
|
"(Note that currently, the Distutils only handles C/C++ extensions for "
|
|
|
|
"Python.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:173
|
|
|
|
msgid "package"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "paquet"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:171
|
|
|
|
msgid ""
|
|
|
|
"a module that contains other modules; typically contained in a directory in "
|
|
|
|
"the filesystem and distinguished from other directories by the presence of a "
|
|
|
|
"file :file:`__init__.py`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:183
|
|
|
|
msgid "root package"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "paquet racine"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:176
|
|
|
|
msgid ""
|
|
|
|
"the root of the hierarchy of packages. (This isn't really a package, since "
|
|
|
|
"it doesn't have an :file:`__init__.py` file. But we have to call it "
|
|
|
|
"something.) The vast majority of the standard library is in the root "
|
|
|
|
"package, as are many small, standalone third-party modules that don't belong "
|
|
|
|
"to a larger module collection. Unlike regular packages, modules in the root "
|
|
|
|
"package can be found in many directories: in fact, every directory listed in "
|
|
|
|
"``sys.path`` contributes modules to the root package."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:188
|
|
|
|
msgid "Distutils-specific terminology"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:190
|
|
|
|
msgid ""
|
|
|
|
"The following terms apply more specifically to the domain of distributing "
|
|
|
|
"Python modules using the Distutils:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:199
|
|
|
|
msgid "module distribution"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:194
|
|
|
|
msgid ""
|
|
|
|
"a collection of Python modules distributed together as a single downloadable "
|
|
|
|
"resource and meant to be installed *en masse*. Examples of some well-known "
|
|
|
|
"module distributions are NumPy, SciPy, PIL (the Python Imaging Library), or "
|
|
|
|
"mxBase. (This would be called a *package*, except that term is already "
|
|
|
|
"taken in the Python context: a single module distribution may contain zero, "
|
|
|
|
"one, or many Python packages.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:203
|
|
|
|
msgid "pure module distribution"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:202
|
|
|
|
msgid ""
|
|
|
|
"a module distribution that contains only pure Python modules and packages. "
|
|
|
|
"Sometimes referred to as a \"pure distribution.\""
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:207
|
|
|
|
msgid "non-pure module distribution"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:206
|
|
|
|
msgid ""
|
|
|
|
"a module distribution that contains at least one extension module. "
|
|
|
|
"Sometimes referred to as a \"non-pure distribution.\""
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:211
|
|
|
|
msgid "distribution root"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/introduction.rst:210
|
|
|
|
msgid ""
|
|
|
|
"the top-level directory of your source tree (or source distribution); the "
|
|
|
|
"directory where :file:`setup.py` exists. Generally :file:`setup.py` will "
|
|
|
|
"be run from this directory."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:9
|
|
|
|
msgid "The Python Package Index (PyPI)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:11
|
|
|
|
msgid ""
|
|
|
|
"The `Python Package Index (PyPI)`_ stores :ref:`meta-data <meta-data>` "
|
|
|
|
"describing distributions packaged with distutils, as well as package data "
|
|
|
|
"like distribution files if a package author wishes."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:15
|
|
|
|
msgid ""
|
|
|
|
"Distutils provides the :command:`register` and :command:`upload` commands "
|
|
|
|
"for pushing meta-data and distribution files to PyPI, respectively. See :"
|
|
|
|
"ref:`package-commands` for information on these commands."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:21
|
|
|
|
msgid "PyPI overview"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:23
|
|
|
|
msgid ""
|
|
|
|
"PyPI lets you submit any number of versions of your distribution to the "
|
|
|
|
"index. If you alter the meta-data for a particular version, you can submit "
|
|
|
|
"it again and the index will be updated."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:27
|
|
|
|
msgid ""
|
|
|
|
"PyPI holds a record for each (name, version) combination submitted. The "
|
|
|
|
"first user to submit information for a given name is designated the Owner of "
|
|
|
|
"that name. Changes can be submitted through the :command:`register` command "
|
|
|
|
"or through the web interface. Owners can designate other users as Owners or "
|
|
|
|
"Maintainers. Maintainers can edit the package information, but not "
|
|
|
|
"designate new Owners or Maintainers."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:34
|
|
|
|
msgid ""
|
|
|
|
"By default PyPI displays only the newest version of a given package. The "
|
|
|
|
"web interface lets one change this default behavior and manually select "
|
|
|
|
"which versions to display and hide."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:38
|
|
|
|
msgid ""
|
|
|
|
"For each version, PyPI displays a home page. The home page is created from "
|
|
|
|
"the ``long_description`` which can be submitted via the :command:`register` "
|
|
|
|
"command. See :ref:`package-display` for more information."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:46
|
|
|
|
msgid "Distutils commands"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:48
|
|
|
|
msgid ""
|
|
|
|
"Distutils exposes two commands for submitting package data to PyPI: the :ref:"
|
|
|
|
"`register <package-register>` command for submitting meta-data to PyPI and "
|
|
|
|
"the :ref:`upload <package-upload>` command for submitting distribution "
|
|
|
|
"files. Both commands read configuration data from a special file called a :"
|
|
|
|
"ref:`.pypirc file <pypirc>`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:58
|
|
|
|
msgid "The ``register`` command"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:60
|
|
|
|
msgid ""
|
|
|
|
"The distutils command :command:`register` is used to submit your "
|
|
|
|
"distribution's meta-data to an index server. It is invoked as follows::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:65
|
|
|
|
msgid "Distutils will respond with the following prompt::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:75
|
|
|
|
msgid ""
|
|
|
|
"Note: if your username and password are saved locally, you will not see this "
|
|
|
|
"menu. Also, refer to :ref:`pypirc` for how to store your credentials in a :"
|
|
|
|
"file:`.pypirc` file."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:79
|
|
|
|
msgid ""
|
|
|
|
"If you have not registered with PyPI, then you will need to do so now. You "
|
|
|
|
"should choose option 2, and enter your details as required. Soon after "
|
|
|
|
"submitting your details, you will receive an email which will be used to "
|
|
|
|
"confirm your registration."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:84
|
|
|
|
msgid ""
|
|
|
|
"Once you are registered, you may choose option 1 from the menu. You will be "
|
|
|
|
"prompted for your PyPI username and password, and :command:`register` will "
|
|
|
|
"then submit your meta-data to the index."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:88
|
|
|
|
msgid ""
|
|
|
|
"See :ref:`package-cmdoptions` for options to the :command:`register` command."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:94
|
|
|
|
msgid "The ``upload`` command"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:96
|
|
|
|
msgid ""
|
|
|
|
"The distutils command :command:`upload` pushes the distribution files to "
|
|
|
|
"PyPI."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:98
|
|
|
|
msgid ""
|
|
|
|
"The command is invoked immediately after building one or more distribution "
|
|
|
|
"files. For example, the command ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:103
|
|
|
|
msgid ""
|
|
|
|
"will cause the source distribution and the Windows installer to be uploaded "
|
|
|
|
"to PyPI. Note that these will be uploaded even if they are built using an "
|
|
|
|
"earlier invocation of :file:`setup.py`, but that only distributions named on "
|
|
|
|
"the command line for the invocation including the :command:`upload` command "
|
|
|
|
"are uploaded."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:108
|
|
|
|
msgid ""
|
|
|
|
"If a :command:`register` command was previously called in the same command, "
|
|
|
|
"and if the password was entered in the prompt, :command:`upload` will reuse "
|
|
|
|
"the entered password. This is useful if you do not want to store a password "
|
|
|
|
"in clear text in a :file:`.pypirc` file."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:113
|
|
|
|
msgid ""
|
|
|
|
"You can use the ``--sign`` option to tell :command:`upload` to sign each "
|
|
|
|
"uploaded file using GPG (GNU Privacy Guard). The :program:`gpg` program "
|
|
|
|
"must be available for execution on the system :envvar:`PATH`. You can also "
|
|
|
|
"specify which key to use for signing using the ``--identity=name`` option."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:118
|
|
|
|
msgid ""
|
|
|
|
"See :ref:`package-cmdoptions` for additional options to the :command:"
|
|
|
|
"`upload` command."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:125
|
|
|
|
msgid "Additional command options"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:127
|
|
|
|
msgid ""
|
|
|
|
"This section describes options common to both the :command:`register` and :"
|
|
|
|
"command:`upload` commands."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:130
|
|
|
|
msgid ""
|
|
|
|
"The ``--repository`` or ``-r`` option lets you specify a PyPI server "
|
|
|
|
"different from the default. For example::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:135
|
|
|
|
msgid ""
|
|
|
|
"For convenience, a name can be used in place of the URL when the :file:`."
|
|
|
|
"pypirc` file is configured to do so. For example::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:140
|
|
|
|
msgid "See :ref:`pypirc` for more information on defining alternate servers."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:142
|
|
|
|
msgid ""
|
|
|
|
"The ``--show-response`` option displays the full response text from the PyPI "
|
|
|
|
"server, which is useful when debugging problems with registering and "
|
|
|
|
"uploading."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:153
|
|
|
|
msgid "The ``.pypirc`` file"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:155
|
|
|
|
msgid ""
|
|
|
|
"The :command:`register` and :command:`upload` commands both check for the "
|
|
|
|
"existence of a :file:`.pypirc` file at the location :file:`$HOME/.pypirc`. "
|
|
|
|
"If this file exists, the command uses the username, password, and repository "
|
|
|
|
"URL configured in the file. The format of a :file:`.pypirc` file is as "
|
|
|
|
"follows::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:170
|
|
|
|
msgid ""
|
|
|
|
"The *distutils* section defines an *index-servers* variable that lists the "
|
|
|
|
"name of all sections describing a repository."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:173
|
|
|
|
msgid "Each section describing a repository defines three variables:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:175
|
|
|
|
msgid "*repository*, that defines the url of the PyPI server. Defaults to"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:176
|
|
|
|
msgid "``https://www.python.org/pypi``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:177
|
|
|
|
msgid "*username*, which is the registered username on the PyPI server."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:179
|
|
|
|
msgid "*password*, that will be used to authenticate. If omitted the user"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:179
|
|
|
|
msgid "will be prompt to type it when needed."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:181
|
|
|
|
msgid ""
|
|
|
|
"If you want to define another server a new section can be created and listed "
|
|
|
|
"in the *index-servers* variable::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:199
|
|
|
|
msgid ""
|
|
|
|
"This allows the :command:`register` and :command:`upload` commands to be "
|
|
|
|
"called with the ``--repository`` option as described in :ref:`package-"
|
|
|
|
"cmdoptions`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:203
|
|
|
|
msgid ""
|
|
|
|
"Specifically, you might want to add the `PyPI Test Repository <https://wiki."
|
|
|
|
"python.org/moin/TestPyPI>`_ to your ``.pypirc`` to facilitate testing before "
|
|
|
|
"doing your first upload to ``PyPI`` itself."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:211
|
|
|
|
msgid "PyPI package display"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:213
|
|
|
|
msgid ""
|
|
|
|
"The ``long_description`` field plays a special role at PyPI. It is used by "
|
|
|
|
"the server to display a home page for the registered package."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:216
|
|
|
|
msgid ""
|
|
|
|
"If you use the `reStructuredText <http://docutils.sourceforge.net/rst."
|
|
|
|
"html>`_ syntax for this field, PyPI will parse it and display an HTML output "
|
|
|
|
"for the package home page."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:220
|
|
|
|
msgid ""
|
|
|
|
"The ``long_description`` field can be attached to a text file located in the "
|
|
|
|
"package::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:231
|
|
|
|
msgid ""
|
|
|
|
"In that case, :file:`README.txt` is a regular reStructuredText text file "
|
|
|
|
"located in the root of the package besides :file:`setup.py`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:234
|
|
|
|
msgid ""
|
|
|
|
"To prevent registering broken reStructuredText content, you can use the :"
|
|
|
|
"program:`rst2html` program that is provided by the :mod:`docutils` package "
|
|
|
|
"and check the ``long_description`` from the command line:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/packageindex.rst:242
|
|
|
|
msgid ""
|
|
|
|
":mod:`docutils` will display a warning if there's something wrong with your "
|
|
|
|
"syntax. Because PyPI applies additional checks (e.g. by passing ``--no-"
|
|
|
|
"raw`` to ``rst2html.py`` in the command above), being able to run the "
|
|
|
|
"command above without warnings does not guarantee that PyPI will convert the "
|
|
|
|
"content successfully."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:5
|
|
|
|
msgid "Writing the Setup Script"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:7
|
|
|
|
msgid ""
|
|
|
|
"The setup script is the centre of all activity in building, distributing, "
|
|
|
|
"and installing modules using the Distutils. The main purpose of the setup "
|
|
|
|
"script is to describe your module distribution to the Distutils, so that the "
|
|
|
|
"various commands that operate on your modules do the right thing. As we saw "
|
|
|
|
"in section :ref:`distutils-simple-example` above, the setup script consists "
|
|
|
|
"mainly of a call to :func:`setup`, and most information supplied to the "
|
|
|
|
"Distutils by the module developer is supplied as keyword arguments to :func:"
|
|
|
|
"`setup`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:15
|
|
|
|
msgid ""
|
|
|
|
"Here's a slightly more involved example, which we'll follow for the next "
|
|
|
|
"couple of sections: the Distutils' own setup script. (Keep in mind that "
|
|
|
|
"although the Distutils are included with Python 1.6 and later, they also "
|
|
|
|
"have an independent existence so that Python 1.5.2 users can use them to "
|
|
|
|
"install other module distributions. The Distutils' own setup script, shown "
|
|
|
|
"here, is used to install the package into Python 1.5.2.) ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:35
|
|
|
|
msgid ""
|
|
|
|
"There are only two differences between this and the trivial one-file "
|
|
|
|
"distribution presented in section :ref:`distutils-simple-example`: more "
|
|
|
|
"metadata, and the specification of pure Python modules by package, rather "
|
|
|
|
"than by module. This is important since the Distutils consist of a couple "
|
|
|
|
"of dozen modules split into (so far) two packages; an explicit list of every "
|
|
|
|
"module would be tedious to generate and difficult to maintain. For more "
|
|
|
|
"information on the additional meta-data, see section :ref:`meta-data`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:43
|
|
|
|
msgid ""
|
|
|
|
"Note that any pathnames (files or directories) supplied in the setup script "
|
|
|
|
"should be written using the Unix convention, i.e. slash-separated. The "
|
|
|
|
"Distutils will take care of converting this platform-neutral representation "
|
|
|
|
"into whatever is appropriate on your current platform before actually using "
|
|
|
|
"the pathname. This makes your setup script portable across operating "
|
|
|
|
"systems, which of course is one of the major goals of the Distutils. In "
|
|
|
|
"this spirit, all pathnames in this document are slash-separated."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:51
|
|
|
|
msgid ""
|
|
|
|
"This, of course, only applies to pathnames given to Distutils functions. If "
|
|
|
|
"you, for example, use standard Python functions such as :func:`glob.glob` "
|
|
|
|
"or :func:`os.listdir` to specify files, you should be careful to write "
|
|
|
|
"portable code instead of hardcoding path separators::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:63
|
|
|
|
msgid "Listing whole packages"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:65
|
|
|
|
msgid ""
|
|
|
|
"The ``packages`` option tells the Distutils to process (build, distribute, "
|
|
|
|
"install, etc.) all pure Python modules found in each package mentioned in "
|
|
|
|
"the ``packages`` list. In order to do this, of course, there has to be a "
|
|
|
|
"correspondence between package names and directories in the filesystem. The "
|
|
|
|
"default correspondence is the most obvious one, i.e. package :mod:"
|
|
|
|
"`distutils` is found in the directory :file:`distutils` relative to the "
|
|
|
|
"distribution root. Thus, when you say ``packages = ['foo']`` in your setup "
|
|
|
|
"script, you are promising that the Distutils will find a file :file:`foo/"
|
|
|
|
"__init__.py` (which might be spelled differently on your system, but you get "
|
|
|
|
"the idea) relative to the directory where your setup script lives. If you "
|
|
|
|
"break this promise, the Distutils will issue a warning but still process the "
|
|
|
|
"broken package anyway."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:77
|
|
|
|
msgid ""
|
|
|
|
"If you use a different convention to lay out your source directory, that's "
|
|
|
|
"no problem: you just have to supply the ``package_dir`` option to tell the "
|
|
|
|
"Distutils about your convention. For example, say you keep all Python "
|
|
|
|
"source under :file:`lib`, so that modules in the \"root package\" (i.e., not "
|
|
|
|
"in any package at all) are in :file:`lib`, modules in the :mod:`foo` package "
|
|
|
|
"are in :file:`lib/foo`, and so forth. Then you would put ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:86
|
|
|
|
msgid ""
|
|
|
|
"in your setup script. The keys to this dictionary are package names, and an "
|
|
|
|
"empty package name stands for the root package. The values are directory "
|
|
|
|
"names relative to your distribution root. In this case, when you say "
|
|
|
|
"``packages = ['foo']``, you are promising that the file :file:`lib/foo/"
|
|
|
|
"__init__.py` exists."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:91
|
|
|
|
msgid ""
|
|
|
|
"Another possible convention is to put the :mod:`foo` package right in :file:"
|
|
|
|
"`lib`, the :mod:`foo.bar` package in :file:`lib/bar`, etc. This would be "
|
|
|
|
"written in the setup script as ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:97
|
|
|
|
msgid ""
|
|
|
|
"A ``package: dir`` entry in the ``package_dir`` dictionary implicitly "
|
|
|
|
"applies to all packages below *package*, so the :mod:`foo.bar` case is "
|
|
|
|
"automatically handled here. In this example, having ``packages = ['foo', "
|
|
|
|
"'foo.bar']`` tells the Distutils to look for :file:`lib/__init__.py` and :"
|
|
|
|
"file:`lib/bar/__init__.py`. (Keep in mind that although ``package_dir`` "
|
|
|
|
"applies recursively, you must explicitly list all packages in ``packages``: "
|
|
|
|
"the Distutils will *not* recursively scan your source tree looking for any "
|
|
|
|
"directory with an :file:`__init__.py` file.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:110
|
|
|
|
msgid "Listing individual modules"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:112
|
|
|
|
msgid ""
|
|
|
|
"For a small module distribution, you might prefer to list all modules rather "
|
|
|
|
"than listing packages---especially the case of a single module that goes in "
|
|
|
|
"the \"root package\" (i.e., no package at all). This simplest case was "
|
|
|
|
"shown in section :ref:`distutils-simple-example`; here is a slightly more "
|
|
|
|
"involved example::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:119
|
|
|
|
msgid ""
|
|
|
|
"This describes two modules, one of them in the \"root\" package, the other "
|
|
|
|
"in the :mod:`pkg` package. Again, the default package/directory layout "
|
|
|
|
"implies that these two modules can be found in :file:`mod1.py` and :file:"
|
|
|
|
"`pkg/mod2.py`, and that :file:`pkg/__init__.py` exists as well. And again, "
|
|
|
|
"you can override the package/directory correspondence using the "
|
|
|
|
"``package_dir`` option."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:129
|
|
|
|
msgid "Describing extension modules"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:131
|
|
|
|
msgid ""
|
|
|
|
"Just as writing Python extension modules is a bit more complicated than "
|
|
|
|
"writing pure Python modules, describing them to the Distutils is a bit more "
|
|
|
|
"complicated. Unlike pure modules, it's not enough just to list modules or "
|
|
|
|
"packages and expect the Distutils to go out and find the right files; you "
|
|
|
|
"have to specify the extension name, source file(s), and any compile/link "
|
|
|
|
"requirements (include directories, libraries to link with, etc.)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:140
|
|
|
|
msgid ""
|
|
|
|
"All of this is done through another keyword argument to :func:`setup`, the "
|
|
|
|
"``ext_modules`` option. ``ext_modules`` is just a list of :class:"
|
|
|
|
"`~distutils.core.Extension` instances, each of which describes a single "
|
|
|
|
"extension module. Suppose your distribution includes a single extension, "
|
|
|
|
"called :mod:`foo` and implemented by :file:`foo.c`. If no additional "
|
|
|
|
"instructions to the compiler/linker are needed, describing this extension is "
|
|
|
|
"quite simple::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:150
|
|
|
|
msgid ""
|
|
|
|
"The :class:`Extension` class can be imported from :mod:`distutils.core` "
|
|
|
|
"along with :func:`setup`. Thus, the setup script for a module distribution "
|
|
|
|
"that contains only this one extension and nothing else might be::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:160
|
|
|
|
msgid ""
|
|
|
|
"The :class:`Extension` class (actually, the underlying extension-building "
|
|
|
|
"machinery implemented by the :command:`build_ext` command) supports a great "
|
|
|
|
"deal of flexibility in describing Python extensions, which is explained in "
|
|
|
|
"the following sections."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:167
|
|
|
|
msgid "Extension names and packages"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:169
|
|
|
|
msgid ""
|
|
|
|
"The first argument to the :class:`~distutils.core.Extension` constructor is "
|
|
|
|
"always the name of the extension, including any package names. For "
|
|
|
|
"example, ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:174
|
|
|
|
msgid "describes an extension that lives in the root package, while ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:178
|
|
|
|
msgid ""
|
|
|
|
"describes the same extension in the :mod:`pkg` package. The source files "
|
|
|
|
"and resulting object code are identical in both cases; the only difference "
|
|
|
|
"is where in the filesystem (and therefore where in Python's namespace "
|
|
|
|
"hierarchy) the resulting extension lives."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:183
|
|
|
|
msgid ""
|
|
|
|
"If you have a number of extensions all in the same package (or all under the "
|
|
|
|
"same base package), use the ``ext_package`` keyword argument to :func:"
|
|
|
|
"`setup`. For example, ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:193
|
|
|
|
msgid ""
|
|
|
|
"will compile :file:`foo.c` to the extension :mod:`pkg.foo`, and :file:`bar."
|
|
|
|
"c` to :mod:`pkg.subpkg.bar`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:198
|
|
|
|
msgid "Extension source files"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:200
|
|
|
|
msgid ""
|
|
|
|
"The second argument to the :class:`~distutils.core.Extension` constructor is "
|
|
|
|
"a list of source files. Since the Distutils currently only support C, C++, "
|
|
|
|
"and Objective-C extensions, these are normally C/C++/Objective-C source "
|
|
|
|
"files. (Be sure to use appropriate extensions to distinguish C++\\ source "
|
|
|
|
"files: :file:`.cc` and :file:`.cpp` seem to be recognized by both Unix and "
|
|
|
|
"Windows compilers.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:207
|
|
|
|
msgid ""
|
|
|
|
"However, you can also include SWIG interface (:file:`.i`) files in the list; "
|
|
|
|
"the :command:`build_ext` command knows how to deal with SWIG extensions: it "
|
|
|
|
"will run SWIG on the interface file and compile the resulting C/C++ file "
|
|
|
|
"into your extension."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:214
|
|
|
|
msgid ""
|
|
|
|
"This warning notwithstanding, options to SWIG can be currently passed like "
|
|
|
|
"this::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:223
|
|
|
|
msgid "Or on the commandline like this::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:227
|
|
|
|
msgid ""
|
|
|
|
"On some platforms, you can include non-source files that are processed by "
|
|
|
|
"the compiler and included in your extension. Currently, this just means "
|
|
|
|
"Windows message text (:file:`.mc`) files and resource definition (:file:`."
|
|
|
|
"rc`) files for Visual C++. These will be compiled to binary resource (:file:"
|
|
|
|
"`.res`) files and linked into the executable."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:235
|
|
|
|
msgid "Preprocessor options"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:237
|
|
|
|
msgid ""
|
|
|
|
"Three optional arguments to :class:`~distutils.core.Extension` will help if "
|
|
|
|
"you need to specify include directories to search or preprocessor macros to "
|
|
|
|
"define/undefine: ``include_dirs``, ``define_macros``, and ``undef_macros``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:241
|
|
|
|
msgid ""
|
|
|
|
"For example, if your extension requires header files in the :file:`include` "
|
|
|
|
"directory under your distribution root, use the ``include_dirs`` option::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:246
|
|
|
|
msgid ""
|
|
|
|
"You can specify absolute directories there; if you know that your extension "
|
|
|
|
"will only be built on Unix systems with X11R6 installed to :file:`/usr`, you "
|
|
|
|
"can get away with ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:252
|
|
|
|
msgid ""
|
|
|
|
"You should avoid this sort of non-portable usage if you plan to distribute "
|
|
|
|
"your code: it's probably better to write C code like ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:257
|
|
|
|
msgid ""
|
|
|
|
"If you need to include header files from some other Python extension, you "
|
|
|
|
"can take advantage of the fact that header files are installed in a "
|
|
|
|
"consistent way by the Distutils :command:`install_headers` command. For "
|
|
|
|
"example, the Numerical Python header files are installed (on a standard Unix "
|
|
|
|
"installation) to :file:`/usr/local/include/python1.5/Numerical`. (The exact "
|
|
|
|
"location will differ according to your platform and Python installation.) "
|
|
|
|
"Since the Python include directory---\\ :file:`/usr/local/include/python1.5` "
|
|
|
|
"in this case---is always included in the search path when building Python "
|
|
|
|
"extensions, the best approach is to write C code like ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:269
|
|
|
|
msgid ""
|
|
|
|
"If you must put the :file:`Numerical` include directory right into your "
|
|
|
|
"header search path, though, you can find that directory using the Distutils :"
|
|
|
|
"mod:`distutils.sysconfig` module::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:279
|
|
|
|
msgid ""
|
|
|
|
"Even though this is quite portable---it will work on any Python "
|
|
|
|
"installation, regardless of platform---it's probably easier to just write "
|
|
|
|
"your C code in the sensible way."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:283
|
|
|
|
msgid ""
|
|
|
|
"You can define and undefine pre-processor macros with the ``define_macros`` "
|
|
|
|
"and ``undef_macros`` options. ``define_macros`` takes a list of ``(name, "
|
|
|
|
"value)`` tuples, where ``name`` is the name of the macro to define (a "
|
|
|
|
"string) and ``value`` is its value: either a string or ``None``. (Defining "
|
|
|
|
"a macro ``FOO`` to ``None`` is the equivalent of a bare ``#define FOO`` in "
|
|
|
|
"your C source: with most compilers, this sets ``FOO`` to the string ``1``.) "
|
|
|
|
"``undef_macros`` is just a list of macros to undefine."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:291
|
|
|
|
msgid "For example::"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Par exemple : ::"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:298
|
|
|
|
msgid "is the equivalent of having this at the top of every C source file::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:307
|
|
|
|
msgid "Library options"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:309
|
|
|
|
msgid ""
|
|
|
|
"You can also specify the libraries to link against when building your "
|
|
|
|
"extension, and the directories to search for those libraries. The "
|
|
|
|
"``libraries`` option is a list of libraries to link against, "
|
|
|
|
"``library_dirs`` is a list of directories to search for libraries at link-"
|
|
|
|
"time, and ``runtime_library_dirs`` is a list of directories to search for "
|
|
|
|
"shared (dynamically loaded) libraries at run-time."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:315
|
|
|
|
msgid ""
|
|
|
|
"For example, if you need to link against libraries known to be in the "
|
|
|
|
"standard library search path on target systems ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:321
|
|
|
|
msgid ""
|
|
|
|
"If you need to link with libraries in a non-standard location, you'll have "
|
|
|
|
"to include the location in ``library_dirs``::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:328
|
|
|
|
msgid ""
|
|
|
|
"(Again, this sort of non-portable construct should be avoided if you intend "
|
|
|
|
"to distribute your code.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:335
|
|
|
|
msgid "Other options"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:337
|
|
|
|
msgid ""
|
|
|
|
"There are still some other options which can be used to handle special cases."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:339
|
|
|
|
msgid ""
|
|
|
|
"The ``optional`` option is a boolean; if it is true, a build failure in the "
|
|
|
|
"extension will not abort the build process, but instead simply not install "
|
|
|
|
"the failing extension."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:343
|
|
|
|
msgid ""
|
|
|
|
"The ``extra_objects`` option is a list of object files to be passed to the "
|
|
|
|
"linker. These files must not have extensions, as the default extension for "
|
|
|
|
"the compiler is used."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:347
|
|
|
|
msgid ""
|
|
|
|
"``extra_compile_args`` and ``extra_link_args`` can be used to specify "
|
|
|
|
"additional command line options for the respective compiler and linker "
|
|
|
|
"command lines."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:351
|
|
|
|
msgid ""
|
|
|
|
"``export_symbols`` is only useful on Windows. It can contain a list of "
|
|
|
|
"symbols (functions or variables) to be exported. This option is not needed "
|
|
|
|
"when building compiled extensions: Distutils will automatically add "
|
|
|
|
"``initmodule`` to the list of exported symbols."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:356
|
|
|
|
msgid ""
|
|
|
|
"The ``depends`` option is a list of files that the extension depends on (for "
|
|
|
|
"example header files). The build command will call the compiler on the "
|
|
|
|
"sources to rebuild extension if any on this files has been modified since "
|
|
|
|
"the previous build."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:362
|
|
|
|
msgid "Relationships between Distributions and Packages"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:364
|
|
|
|
msgid "A distribution may relate to packages in three specific ways:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:366
|
|
|
|
msgid "It can require packages or modules."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:368
|
|
|
|
msgid "It can provide packages or modules."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:370
|
|
|
|
msgid "It can obsolete packages or modules."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:372
|
|
|
|
msgid ""
|
|
|
|
"These relationships can be specified using keyword arguments to the :func:"
|
|
|
|
"`distutils.core.setup` function."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:375
|
|
|
|
msgid ""
|
|
|
|
"Dependencies on other Python modules and packages can be specified by "
|
|
|
|
"supplying the *requires* keyword argument to :func:`setup`. The value must "
|
|
|
|
"be a list of strings. Each string specifies a package that is required, and "
|
|
|
|
"optionally what versions are sufficient."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:380
|
|
|
|
msgid ""
|
|
|
|
"To specify that any version of a module or package is required, the string "
|
|
|
|
"should consist entirely of the module or package name. Examples include "
|
|
|
|
"``'mymodule'`` and ``'xml.parsers.expat'``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:384
|
|
|
|
msgid ""
|
|
|
|
"If specific versions are required, a sequence of qualifiers can be supplied "
|
|
|
|
"in parentheses. Each qualifier may consist of a comparison operator and a "
|
|
|
|
"version number. The accepted comparison operators are::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:391
|
|
|
|
msgid ""
|
|
|
|
"These can be combined by using multiple qualifiers separated by commas (and "
|
|
|
|
"optional whitespace). In this case, all of the qualifiers must be matched; "
|
|
|
|
"a logical AND is used to combine the evaluations."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:395
|
|
|
|
msgid "Let's look at a bunch of examples:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:398
|
|
|
|
msgid "Requires Expression"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:398 ../Doc/distutils/setupscript.rst:416
|
|
|
|
msgid "Explanation"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:400
|
|
|
|
msgid "``==1.0``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:400
|
|
|
|
msgid "Only version ``1.0`` is compatible"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:402
|
|
|
|
msgid "``>1.0, !=1.5.1, <2.0``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:402
|
|
|
|
msgid ""
|
|
|
|
"Any version after ``1.0`` and before ``2.0`` is compatible, except ``1.5.1``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:406
|
|
|
|
msgid ""
|
|
|
|
"Now that we can specify dependencies, we also need to be able to specify "
|
|
|
|
"what we provide that other distributions can require. This is done using "
|
|
|
|
"the *provides* keyword argument to :func:`setup`. The value for this keyword "
|
|
|
|
"is a list of strings, each of which names a Python module or package, and "
|
|
|
|
"optionally identifies the version. If the version is not specified, it is "
|
|
|
|
"assumed to match that of the distribution."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:413
|
|
|
|
msgid "Some examples:"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Quelques exemples :"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:416
|
|
|
|
msgid "Provides Expression"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:418
|
|
|
|
msgid "``mypkg``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:418
|
|
|
|
msgid "Provide ``mypkg``, using the distribution version"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:421
|
|
|
|
msgid "``mypkg (1.1)``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:421
|
|
|
|
msgid "Provide ``mypkg`` version 1.1, regardless of the distribution version"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:425
|
|
|
|
msgid ""
|
|
|
|
"A package can declare that it obsoletes other packages using the *obsoletes* "
|
|
|
|
"keyword argument. The value for this is similar to that of the *requires* "
|
|
|
|
"keyword: a list of strings giving module or package specifiers. Each "
|
|
|
|
"specifier consists of a module or package name optionally followed by one or "
|
|
|
|
"more version qualifiers. Version qualifiers are given in parentheses after "
|
|
|
|
"the module or package name."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:432
|
|
|
|
msgid ""
|
|
|
|
"The versions identified by the qualifiers are those that are obsoleted by "
|
|
|
|
"the distribution being described. If no qualifiers are given, all versions "
|
|
|
|
"of the named module or package are understood to be obsoleted."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:439
|
|
|
|
msgid "Installing Scripts"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:441
|
|
|
|
msgid ""
|
|
|
|
"So far we have been dealing with pure and non-pure Python modules, which are "
|
|
|
|
"usually not run by themselves but imported by scripts."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:444
|
|
|
|
msgid ""
|
|
|
|
"Scripts are files containing Python source code, intended to be started from "
|
|
|
|
"the command line. Scripts don't require Distutils to do anything very "
|
|
|
|
"complicated. The only clever feature is that if the first line of the script "
|
|
|
|
"starts with ``#!`` and contains the word \"python\", the Distutils will "
|
|
|
|
"adjust the first line to refer to the current interpreter location. By "
|
|
|
|
"default, it is replaced with the current interpreter location. The :option:"
|
|
|
|
"`--executable` (or :option:`-e`) option will allow the interpreter path to "
|
|
|
|
"be explicitly overridden."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:452
|
|
|
|
msgid ""
|
|
|
|
"The ``scripts`` option simply is a list of files to be handled in this way. "
|
|
|
|
"From the PyXML setup script::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:459
|
|
|
|
msgid ""
|
|
|
|
"All the scripts will also be added to the ``MANIFEST`` file if no template "
|
|
|
|
"is provided. See :ref:`manifest`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:467
|
|
|
|
msgid "Installing Package Data"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:469
|
|
|
|
msgid ""
|
|
|
|
"Often, additional files need to be installed into a package. These files "
|
|
|
|
"are often data that's closely related to the package's implementation, or "
|
|
|
|
"text files containing documentation that might be of interest to programmers "
|
|
|
|
"using the package. These files are called :dfn:`package data`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:474
|
|
|
|
msgid ""
|
|
|
|
"Package data can be added to packages using the ``package_data`` keyword "
|
|
|
|
"argument to the :func:`setup` function. The value must be a mapping from "
|
|
|
|
"package name to a list of relative path names that should be copied into the "
|
|
|
|
"package. The paths are interpreted as relative to the directory containing "
|
|
|
|
"the package (information from the ``package_dir`` mapping is used if "
|
|
|
|
"appropriate); that is, the files are expected to be part of the package in "
|
|
|
|
"the source directories. They may contain glob patterns as well."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:482
|
|
|
|
msgid ""
|
|
|
|
"The path names may contain directory portions; any necessary directories "
|
|
|
|
"will be created in the installation."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:485
|
|
|
|
msgid ""
|
|
|
|
"For example, if a package should contain a subdirectory with several data "
|
|
|
|
"files, the files can be arranged like this in the source tree::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:498
|
|
|
|
msgid "The corresponding call to :func:`setup` might be::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:507
|
|
|
|
msgid ""
|
|
|
|
"All the files that match ``package_data`` will be added to the ``MANIFEST`` "
|
|
|
|
"file if no template is provided. See :ref:`manifest`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:515
|
|
|
|
msgid "Installing Additional Files"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:517
|
|
|
|
msgid ""
|
|
|
|
"The ``data_files`` option can be used to specify additional files needed by "
|
|
|
|
"the module distribution: configuration files, message catalogs, data files, "
|
|
|
|
"anything which doesn't fit in the previous categories."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:521
|
|
|
|
msgid ""
|
|
|
|
"``data_files`` specifies a sequence of (*directory*, *files*) pairs in the "
|
|
|
|
"following way::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:530
|
|
|
|
msgid ""
|
|
|
|
"Note that you can specify the directory names where the data files will be "
|
|
|
|
"installed, but you cannot rename the data files themselves."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:533
|
|
|
|
msgid ""
|
|
|
|
"Each (*directory*, *files*) pair in the sequence specifies the installation "
|
|
|
|
"directory and the files to install there. If *directory* is a relative "
|
|
|
|
"path, it is interpreted relative to the installation prefix (Python's ``sys."
|
|
|
|
"prefix`` for pure-Python packages, ``sys.exec_prefix`` for packages that "
|
|
|
|
"contain extension modules). Each file name in *files* is interpreted "
|
|
|
|
"relative to the :file:`setup.py` script at the top of the package source "
|
|
|
|
"distribution. No directory information from *files* is used to determine "
|
|
|
|
"the final location of the installed file; only the name of the file is used."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:542
|
|
|
|
msgid ""
|
|
|
|
"You can specify the ``data_files`` options as a simple sequence of files "
|
|
|
|
"without specifying a target directory, but this is not recommended, and the :"
|
|
|
|
"command:`install` command will print a warning in this case. To install data "
|
|
|
|
"files directly in the target directory, an empty string should be given as "
|
|
|
|
"the directory."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:548
|
|
|
|
msgid ""
|
|
|
|
"All the files that match ``data_files`` will be added to the ``MANIFEST`` "
|
|
|
|
"file if no template is provided. See :ref:`manifest`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:556
|
|
|
|
msgid "Additional meta-data"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:558
|
|
|
|
msgid ""
|
|
|
|
"The setup script may include additional meta-data beyond the name and "
|
|
|
|
"version. This information includes:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:562
|
|
|
|
msgid "Meta-Data"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:562
|
|
|
|
msgid "Value"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "Valeur"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:564
|
|
|
|
msgid "name of the package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:564 ../Doc/distutils/setupscript.rst:566
|
|
|
|
#: ../Doc/distutils/setupscript.rst:568 ../Doc/distutils/setupscript.rst:573
|
|
|
|
#: ../Doc/distutils/setupscript.rst:580 ../Doc/distutils/setupscript.rst:594
|
|
|
|
msgid "short string"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:566
|
|
|
|
msgid "version of this release"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:566
|
|
|
|
msgid "(1)(2)"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "(1)(2)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:568
|
|
|
|
msgid "``author``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:568
|
|
|
|
msgid "package author's name"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:570
|
|
|
|
msgid "``author_email``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:570
|
|
|
|
msgid "email address of the package author"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:570 ../Doc/distutils/setupscript.rst:575
|
|
|
|
msgid "email address"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:573
|
|
|
|
msgid "``maintainer``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:573
|
|
|
|
msgid "package maintainer's name"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:575
|
|
|
|
msgid "``maintainer_email``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:575
|
|
|
|
msgid "email address of the package maintainer"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:578
|
|
|
|
msgid "home page for the package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:578 ../Doc/distutils/setupscript.rst:587
|
|
|
|
msgid "URL"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:580
|
|
|
|
msgid "short, summary description of the package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:584
|
|
|
|
msgid "longer description of the package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:584
|
|
|
|
msgid "long string"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:587
|
|
|
|
msgid "``download_url``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:587
|
|
|
|
msgid "location where the package may be downloaded"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:590
|
|
|
|
msgid "``classifiers``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:590
|
|
|
|
msgid "a list of classifiers"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:590 ../Doc/distutils/setupscript.rst:592
|
|
|
|
msgid "list of strings"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:592
|
|
|
|
msgid "``platforms``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:592
|
|
|
|
msgid "a list of platforms"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:594
|
|
|
|
msgid "license for the package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:594
|
|
|
|
msgid "\\(6)"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "\\(6)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:600
|
|
|
|
msgid "These fields are required."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:603
|
|
|
|
msgid ""
|
|
|
|
"It is recommended that versions take the form *major.minor[.patch[.sub]]*."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:606
|
|
|
|
msgid ""
|
|
|
|
"Either the author or the maintainer must be identified. If maintainer is "
|
|
|
|
"provided, distutils lists it as the author in :file:`PKG-INFO`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:610
|
|
|
|
msgid ""
|
|
|
|
"These fields should not be used if your package is to be compatible with "
|
|
|
|
"Python versions prior to 2.2.3 or 2.3. The list is available from the `PyPI "
|
|
|
|
"website <https://pypi.python.org/pypi>`_."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:615
|
|
|
|
msgid ""
|
|
|
|
"The ``long_description`` field is used by PyPI when you are :ref:"
|
|
|
|
"`registering <package-register>` a package, to :ref:`build its home page "
|
|
|
|
"<package-display>`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:620
|
|
|
|
msgid ""
|
|
|
|
"The ``license`` field is a text indicating the license covering the package "
|
|
|
|
"where the license is not a selection from the \"License\" Trove classifiers. "
|
|
|
|
"See the ``Classifier`` field. Notice that there's a ``licence`` distribution "
|
|
|
|
"option which is deprecated but still acts as an alias for ``license``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:627
|
|
|
|
msgid "'short string'"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "'chaîne courte'"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:627
|
|
|
|
msgid "A single line of text, not more than 200 characters."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:631
|
|
|
|
msgid "'long string'"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "'chaîne longue'"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:630
|
|
|
|
msgid ""
|
|
|
|
"Multiple lines of plain text in reStructuredText format (see http://docutils."
|
|
|
|
"sourceforge.net/)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:634
|
|
|
|
msgid "'list of strings'"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "'liste de chaînes'"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:634
|
|
|
|
msgid "See below."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:636
|
|
|
|
msgid ""
|
|
|
|
"Encoding the version information is an art in itself. Python packages "
|
|
|
|
"generally adhere to the version format *major.minor[.patch][sub]*. The major "
|
|
|
|
"number is 0 for initial, experimental releases of software. It is "
|
|
|
|
"incremented for releases that represent major milestones in a package. The "
|
|
|
|
"minor number is incremented when important new features are added to the "
|
|
|
|
"package. The patch number increments when bug-fix releases are made. "
|
|
|
|
"Additional trailing version information is sometimes used to indicate sub-"
|
|
|
|
"releases. These are \"a1,a2,...,aN\" (for alpha releases, where "
|
|
|
|
"functionality and API may change), \"b1,b2,...,bN\" (for beta releases, "
|
|
|
|
"which only fix bugs) and \"pr1,pr2,...,prN\" (for final pre-release release "
|
|
|
|
"testing). Some examples:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:648
|
|
|
|
msgid "0.1.0"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:648
|
|
|
|
msgid "the first, experimental release of a package"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:651
|
|
|
|
msgid "1.0.1a2"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:651
|
|
|
|
msgid "the second alpha release of the first patch version of 1.0"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:653
|
|
|
|
msgid "``classifiers`` are specified in a Python list::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:677
|
|
|
|
msgid "Debugging the setup script"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:679
|
|
|
|
msgid ""
|
|
|
|
"Sometimes things go wrong, and the setup script doesn't do what the "
|
|
|
|
"developer wants."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:682
|
|
|
|
msgid ""
|
|
|
|
"Distutils catches any exceptions when running the setup script, and print a "
|
|
|
|
"simple error message before the script is terminated. The motivation for "
|
|
|
|
"this behaviour is to not confuse administrators who don't know much about "
|
|
|
|
"Python and are trying to install a package. If they get a big long "
|
|
|
|
"traceback from deep inside the guts of Distutils, they may think the package "
|
|
|
|
"or the Python installation is broken because they don't read all the way "
|
|
|
|
"down to the bottom and see that it's a permission problem."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/setupscript.rst:690
|
|
|
|
msgid ""
|
|
|
|
"On the other hand, this doesn't help the developer to find the cause of the "
|
|
|
|
"failure. For this purpose, the :envvar:`DISTUTILS_DEBUG` environment "
|
|
|
|
"variable can be set to anything except an empty string, and distutils will "
|
|
|
|
"now print detailed information about what it is doing, dump the full "
|
|
|
|
"traceback when an exception occurs, and print the whole command line when an "
|
|
|
|
"external program (like a C compiler) fails."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:5
|
|
|
|
msgid "Creating a Source Distribution"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:7
|
|
|
|
msgid ""
|
|
|
|
"As shown in section :ref:`distutils-simple-example`, you use the :command:"
|
|
|
|
"`sdist` command to create a source distribution. In the simplest case, ::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:12
|
|
|
|
msgid ""
|
|
|
|
"(assuming you haven't specified any :command:`sdist` options in the setup "
|
|
|
|
"script or config file), :command:`sdist` creates the archive of the default "
|
|
|
|
"format for the current platform. The default format is a gzip'ed tar file (:"
|
|
|
|
"file:`.tar.gz`) on Unix, and ZIP file on Windows."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:17
|
|
|
|
msgid ""
|
|
|
|
"You can specify as many formats as you like using the :option:`--formats` "
|
|
|
|
"option, for example::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:22
|
|
|
|
msgid "to create a gzipped tarball and a zip file. The available formats are:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:27
|
|
|
|
msgid "(1),(3)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:29
|
|
|
|
msgid "gzip'ed tar file (:file:`.tar.gz`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:29
|
|
|
|
msgid "\\(2)"
|
2016-10-17 19:46:02 +00:00
|
|
|
msgstr "\\(2)"
|
2016-10-17 19:42:06 +00:00
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:32
|
|
|
|
msgid "bzip2'ed tar file (:file:`.tar.bz2`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:35
|
|
|
|
msgid "xz'ed tar file (:file:`.tar.xz`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:60
|
|
|
|
msgid ""
|
|
|
|
"requires the :program:`compress` program. Notice that this format is now "
|
|
|
|
"pending for deprecation and will be removed in the future versions of Python."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:63
|
|
|
|
msgid ""
|
|
|
|
"When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or "
|
|
|
|
"``tar``), under Unix you can specify the ``owner`` and ``group`` names that "
|
|
|
|
"will be set for each member of the archive."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:67
|
|
|
|
msgid "For example, if you want all files of the archive to be owned by root::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:75
|
|
|
|
msgid "Specifying the files to distribute"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:77
|
|
|
|
msgid ""
|
|
|
|
"If you don't supply an explicit list of files (or instructions on how to "
|
|
|
|
"generate one), the :command:`sdist` command puts a minimal default set into "
|
|
|
|
"the source distribution:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:81
|
|
|
|
msgid ""
|
|
|
|
"all Python source files implied by the ``py_modules`` and ``packages`` "
|
|
|
|
"options"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:84
|
|
|
|
msgid ""
|
|
|
|
"all C source files mentioned in the ``ext_modules`` or ``libraries`` options"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:90
|
|
|
|
msgid ""
|
|
|
|
"scripts identified by the ``scripts`` option See :ref:`distutils-installing-"
|
|
|
|
"scripts`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:93
|
|
|
|
msgid ""
|
|
|
|
"anything that looks like a test script: :file:`test/test\\*.py` (currently, "
|
|
|
|
"the Distutils don't do anything with test scripts except include them in "
|
|
|
|
"source distributions, but in the future there will be a standard for testing "
|
|
|
|
"Python module distributions)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:98
|
|
|
|
msgid ""
|
|
|
|
":file:`README.txt` (or :file:`README`), :file:`setup.py` (or whatever you "
|
|
|
|
"called your setup script), and :file:`setup.cfg`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:101
|
|
|
|
msgid ""
|
|
|
|
"all files that matches the ``package_data`` metadata. See :ref:`distutils-"
|
|
|
|
"installing-package-data`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:104
|
|
|
|
msgid ""
|
|
|
|
"all files that matches the ``data_files`` metadata. See :ref:`distutils-"
|
|
|
|
"additional-files`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:107
|
|
|
|
msgid ""
|
|
|
|
"Sometimes this is enough, but usually you will want to specify additional "
|
|
|
|
"files to distribute. The typical way to do this is to write a *manifest "
|
|
|
|
"template*, called :file:`MANIFEST.in` by default. The manifest template is "
|
|
|
|
"just a list of instructions for how to generate your manifest file, :file:"
|
|
|
|
"`MANIFEST`, which is the exact list of files to include in your source "
|
|
|
|
"distribution. The :command:`sdist` command processes this template and "
|
|
|
|
"generates a manifest based on its instructions and what it finds in the "
|
|
|
|
"filesystem."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:115
|
|
|
|
msgid ""
|
|
|
|
"If you prefer to roll your own manifest file, the format is simple: one "
|
|
|
|
"filename per line, regular files (or symlinks to them) only. If you do "
|
|
|
|
"supply your own :file:`MANIFEST`, you must specify everything: the default "
|
|
|
|
"set of files described above does not apply in this case."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:120
|
|
|
|
msgid ""
|
|
|
|
"An existing generated :file:`MANIFEST` will be regenerated without :command:"
|
|
|
|
"`sdist` comparing its modification time to the one of :file:`MANIFEST.in` "
|
|
|
|
"or :file:`setup.py`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:125
|
|
|
|
msgid ""
|
|
|
|
":file:`MANIFEST` files start with a comment indicating they are generated. "
|
|
|
|
"Files without this comment are not overwritten or removed."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:129
|
|
|
|
msgid ""
|
|
|
|
":command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in` "
|
|
|
|
"exists, like it used to do."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:134
|
|
|
|
msgid ""
|
|
|
|
"The manifest template has one command per line, where each command specifies "
|
|
|
|
"a set of files to include or exclude from the source distribution. For an "
|
|
|
|
"example, again we turn to the Distutils' own manifest template:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:144
|
|
|
|
msgid ""
|
|
|
|
"The meanings should be fairly clear: include all files in the distribution "
|
|
|
|
"root matching :file:`\\*.txt`, all files anywhere under the :file:`examples` "
|
|
|
|
"directory matching :file:`\\*.txt` or :file:`\\*.py`, and exclude all "
|
|
|
|
"directories matching :file:`examples/sample?/build`. All of this is done "
|
|
|
|
"*after* the standard include set, so you can exclude files from the standard "
|
|
|
|
"set with explicit instructions in the manifest template. (Or, you can use "
|
|
|
|
"the :option:`--no-defaults` option to disable the standard set entirely.) "
|
|
|
|
"There are several other commands available in the manifest template mini-"
|
|
|
|
"language; see section :ref:`sdist-cmd`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:154
|
|
|
|
msgid ""
|
|
|
|
"The order of commands in the manifest template matters: initially, we have "
|
|
|
|
"the list of default files as described above, and each command in the "
|
|
|
|
"template adds to or removes from that list of files. Once we have fully "
|
|
|
|
"processed the manifest template, we remove files that should not be included "
|
|
|
|
"in the source distribution:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:160
|
|
|
|
msgid "all files in the Distutils \"build\" tree (default :file:`build/`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:162
|
|
|
|
msgid ""
|
|
|
|
"all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`, :file:"
|
|
|
|
"`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:165
|
|
|
|
msgid ""
|
|
|
|
"Now we have our complete list of files, which is written to the manifest for "
|
|
|
|
"future reference, and then used to build the source distribution archive(s)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:168
|
|
|
|
msgid ""
|
|
|
|
"You can disable the default set of included files with the :option:`--no-"
|
|
|
|
"defaults` option, and you can disable the standard exclude set with :option:"
|
|
|
|
"`--no-prune`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:172
|
|
|
|
msgid ""
|
|
|
|
"Following the Distutils' own manifest template, let's trace how the :command:"
|
|
|
|
"`sdist` command builds the list of files to include in the Distutils source "
|
|
|
|
"distribution:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:176
|
|
|
|
msgid ""
|
|
|
|
"include all Python source files in the :file:`distutils` and :file:"
|
|
|
|
"`distutils/command` subdirectories (because packages corresponding to those "
|
|
|
|
"two directories were mentioned in the ``packages`` option in the setup "
|
|
|
|
"script---see section :ref:`setup-script`)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:181
|
|
|
|
msgid ""
|
|
|
|
"include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` "
|
|
|
|
"(standard files)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:184
|
|
|
|
msgid "include :file:`test/test\\*.py` (standard files)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:186
|
|
|
|
msgid ""
|
|
|
|
"include :file:`\\*.txt` in the distribution root (this will find :file:"
|
|
|
|
"`README.txt` a second time, but such redundancies are weeded out later)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:189
|
|
|
|
msgid ""
|
|
|
|
"include anything matching :file:`\\*.txt` or :file:`\\*.py` in the sub-tree "
|
|
|
|
"under :file:`examples`,"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:192
|
|
|
|
msgid ""
|
|
|
|
"exclude all files in the sub-trees starting at directories matching :file:"
|
|
|
|
"`examples/sample?/build`\\ ---this may exclude files included by the "
|
|
|
|
"previous two steps, so it's important that the ``prune`` command in the "
|
|
|
|
"manifest template comes after the ``recursive-include`` command"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:197
|
|
|
|
msgid ""
|
|
|
|
"exclude the entire :file:`build` tree, and any :file:`RCS`, :file:`CVS`, :"
|
|
|
|
"file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` and :file:`_darcs` "
|
|
|
|
"directories"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:201
|
|
|
|
msgid ""
|
|
|
|
"Just like in the setup script, file and directory names in the manifest "
|
|
|
|
"template should always be slash-separated; the Distutils will take care of "
|
|
|
|
"converting them to the standard representation on your platform. That way, "
|
|
|
|
"the manifest template is portable across operating systems."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:210
|
|
|
|
msgid "Manifest-related options"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:212
|
|
|
|
msgid ""
|
|
|
|
"The normal course of operations for the :command:`sdist` command is as "
|
|
|
|
"follows:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:214
|
|
|
|
msgid ""
|
|
|
|
"if the manifest file (:file:`MANIFEST` by default) exists and the first line "
|
|
|
|
"does not have a comment indicating it is generated from :file:`MANIFEST.in`, "
|
|
|
|
"then it is used as is, unaltered"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:218
|
|
|
|
msgid ""
|
|
|
|
"if the manifest file doesn't exist or has been previously automatically "
|
|
|
|
"generated, read :file:`MANIFEST.in` and create the manifest"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:221
|
|
|
|
msgid ""
|
|
|
|
"if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest "
|
|
|
|
"with just the default file set"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:224
|
|
|
|
msgid ""
|
|
|
|
"use the list of files now in :file:`MANIFEST` (either just generated or read "
|
|
|
|
"in) to create the source distribution archive(s)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:227
|
|
|
|
msgid ""
|
|
|
|
"There are a couple of options that modify this behaviour. First, use the :"
|
|
|
|
"option:`--no-defaults` and :option:`--no-prune` to disable the standard "
|
|
|
|
"\"include\" and \"exclude\" sets."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:231
|
|
|
|
msgid ""
|
|
|
|
"Second, you might just want to (re)generate the manifest, but not create a "
|
|
|
|
"source distribution::"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/sourcedist.rst:236
|
|
|
|
msgid ":option:`-o` is a shortcut for :option:`--manifest-only`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/uploading.rst:5
|
|
|
|
msgid "Uploading Packages to the Package Index"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/distutils/uploading.rst:7
|
|
|
|
msgid ""
|
|
|
|
"The contents of this page have moved to the section :ref:`package-index`."
|
|
|
|
msgstr ""
|