# SOME DESCRIPTIVE TITLE. # Copyright (C) 1990-2010, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-12-22 00:51+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Translate Toolkit 1.7.0\n" #: distutils/apiref.rst:5 msgid "API Reference" msgstr "Référence de l'API" #: distutils/apiref.rst:9 msgid ":mod:`distutils.core` --- Core Distutils functionality" msgstr "" #: 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 "" "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`." #: distutils/apiref.rst:23 #, fuzzy msgid "" "The basic do-everything function that does most everything you could ever " "ask for from a Distutils method." msgstr "" "La fonction de base à tout faire qui fait presque tout ce dont vous pourriez " "attendre d'une méthode Distutils. Voir XXXXX" #: distutils/apiref.rst:26 msgid "" "The setup function takes a large number of arguments. These are laid out in " "the following table." msgstr "" "La fonction setup prend un grand nombre d'arguments. Ils sont présentés dans " "le tableau suivant." #: distutils/apiref.rst:32 distutils/apiref.rst:175 msgid "argument name" msgstr "nom de l'argument" #: distutils/apiref.rst:32 distutils/apiref.rst:133 distutils/apiref.rst:175 msgid "value" msgstr "valeur" #: distutils/apiref.rst:32 distutils/apiref.rst:175 msgid "type" msgstr "type" #: distutils/apiref.rst:34 distutils/apiref.rst:177 msgid "*name*" msgstr "*name*" # aconrad: package ? paquet ? #: distutils/apiref.rst:34 msgid "The name of the package" msgstr "Le nom du paquet" #: distutils/apiref.rst:34 distutils/apiref.rst:36 distutils/apiref.rst:40 #: distutils/apiref.rst:43 distutils/apiref.rst:46 distutils/apiref.rst:48 #: distutils/apiref.rst:51 distutils/apiref.rst:58 distutils/apiref.rst:62 #: distutils/apiref.rst:65 distutils/apiref.rst:86 distutils/apiref.rst:96 #: distutils/apiref.rst:177 distutils/apiref.rst:267 msgid "a string" msgstr "une chaîne de caractères" #: distutils/apiref.rst:36 msgid "*version*" msgstr "*version*" #: distutils/apiref.rst:36 #, fuzzy msgid "The version number of the package; see :mod:`distutils.version`" msgstr "Le numéro de version du paquet" #: distutils/apiref.rst:40 msgid "*description*" msgstr "*description*" #: distutils/apiref.rst:40 msgid "A single line describing the package" msgstr "Une ligne unique décrivant le paquet" #: distutils/apiref.rst:43 msgid "*long_description*" msgstr "*long_description*" #: distutils/apiref.rst:43 msgid "Longer description of the package" msgstr "Une description plus longue du paquet" #: distutils/apiref.rst:46 msgid "*author*" msgstr "*author*" #: distutils/apiref.rst:46 msgid "The name of the package author" msgstr "Le nom de l'auteur du paquet" #: distutils/apiref.rst:48 msgid "*author_email*" msgstr "*author_email*" #: distutils/apiref.rst:48 msgid "The email address of the package author" msgstr "L'adresse e-mail de l'auteur du paquet" #: distutils/apiref.rst:51 msgid "*maintainer*" msgstr "*maintainer*" #: 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 "" #: distutils/apiref.rst:58 msgid "*maintainer_email*" msgstr "*maintainer_email*" #: distutils/apiref.rst:58 msgid "" "The email address of the current maintainer, if different from the author" msgstr "L'adresse email de l'actuel mainteneur, si différent de l'auteur" #: distutils/apiref.rst:62 msgid "*url*" msgstr "*url*" #: distutils/apiref.rst:62 msgid "A URL for the package (homepage)" msgstr "Une URL pour le paquet (page d'accueil)" #: distutils/apiref.rst:65 msgid "*download_url*" msgstr "*download_url*" #: distutils/apiref.rst:65 msgid "A URL to download the package" msgstr "Une URL pour télécharger le paquet" #: distutils/apiref.rst:67 msgid "*packages*" msgstr "*packages*" #: distutils/apiref.rst:67 msgid "A list of Python packages that distutils will manipulate" msgstr "Une liste des paquets Python que distutils va manipuler" #: distutils/apiref.rst:67 distutils/apiref.rst:70 distutils/apiref.rst:73 #: distutils/apiref.rst:90 distutils/apiref.rst:183 distutils/apiref.rst:196 #: distutils/apiref.rst:212 distutils/apiref.rst:215 distutils/apiref.rst:219 #: distutils/apiref.rst:223 distutils/apiref.rst:229 distutils/apiref.rst:236 #: distutils/apiref.rst:247 distutils/apiref.rst:256 distutils/apiref.rst:264 msgid "a list of strings" msgstr "une liste de chaînes" #: distutils/apiref.rst:70 msgid "*py_modules*" msgstr "*py_modules*" #: distutils/apiref.rst:70 msgid "A list of Python modules that distutils will manipulate" msgstr "Une liste de modules Python que distutils va manipuler" #: distutils/apiref.rst:73 msgid "*scripts*" msgstr "*scripts*" #: distutils/apiref.rst:73 msgid "A list of standalone script files to be built and installed" msgstr "Une liste de scripts autonomes à construire et à installer" #: distutils/apiref.rst:77 msgid "*ext_modules*" msgstr "*ext_modules*" #: distutils/apiref.rst:77 msgid "A list of Python extensions to be built" msgstr "Une liste des extensions Python à construire" #: distutils/apiref.rst:77 #, fuzzy msgid "a list of instances of :class:`distutils.core.Extension`" msgstr "Une liste d'instances de :class:`distutils.core.Extension'" #: distutils/apiref.rst:80 msgid "*classifiers*" msgstr "*classifiers*" #: distutils/apiref.rst:80 msgid "A list of categories for the package" msgstr "Une liste de catégories pour le paquet" #: distutils/apiref.rst:80 #, fuzzy msgid "" "a list of strings; valid classifiers are listed on `PyPI `_." msgstr "" "La liste des catégorisations est disponibles sur http://pypi.python.org/" "pypi?:action=list_classifiers." #: distutils/apiref.rst:83 msgid "*distclass*" msgstr "*distclass*" #: distutils/apiref.rst:83 msgid "the :class:`Distribution` class to use" msgstr "la classe :class:`Distribution` à utiliser" #: distutils/apiref.rst:83 #, fuzzy msgid "a subclass of :class:`distutils.core.Distribution`" msgstr "Une sous classe de :class:`distutils.core.Distribution`" #: distutils/apiref.rst:86 msgid "*script_name*" msgstr "*script_name*" #: distutils/apiref.rst:86 msgid "The name of the setup.py script - defaults to ``sys.argv[0]``" msgstr "" #: distutils/apiref.rst:90 msgid "*script_args*" msgstr "*script_args*" #: distutils/apiref.rst:90 msgid "Arguments to supply to the setup script" msgstr "Arguments à fournir au script d'installation" #: distutils/apiref.rst:93 msgid "*options*" msgstr "*options*" #: distutils/apiref.rst:93 msgid "default options for the setup script" msgstr "options par défaut pour le script d'installation" #: distutils/apiref.rst:93 distutils/apiref.rst:103 distutils/apiref.rst:109 msgid "a dictionary" msgstr "un dictionnaire" #: distutils/apiref.rst:96 msgid "*license*" msgstr "*license*" #: distutils/apiref.rst:96 msgid "The license for the package" msgstr "La licence pour le paquet" #: distutils/apiref.rst:98 msgid "*keywords*" msgstr "*keywords*" #: distutils/apiref.rst:98 msgid "Descriptive meta-data, see :pep:`314`" msgstr "Méta-données descriptives, voir :pep:`314`" #: distutils/apiref.rst:98 distutils/apiref.rst:101 msgid "a list of strings or a comma-separated string" msgstr "" #: distutils/apiref.rst:101 msgid "*platforms*" msgstr "*platforms*" #: distutils/apiref.rst:103 msgid "*cmdclass*" msgstr "*cmdclass*" #: distutils/apiref.rst:103 msgid "A mapping of command names to :class:`Command` subclasses" msgstr "Un mapping des noms de commandes et des sous-classes :class:`Command`" #: distutils/apiref.rst:106 msgid "*data_files*" msgstr "*data_files*" #: distutils/apiref.rst:106 msgid "A list of data files to install" msgstr "Une liste de fichiers de données à installer" #: distutils/apiref.rst:106 msgid "a list" msgstr "une liste" #: distutils/apiref.rst:109 msgid "*package_dir*" msgstr "*package_dir*" #: distutils/apiref.rst:109 msgid "A mapping of package to directory names" msgstr "Un mapping des paquets et des noms de dossiers" #: 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 "" #: distutils/apiref.rst:123 #, fuzzy msgid "" "*script_name* is a file that will be run with :func:`execfile` ``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 "" "*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." #: distutils/apiref.rst:128 msgid "" "*stop_after* tells :func:`setup` when to stop processing; possible values:" msgstr "*stop_after* dit à :func:`setup` quand s'arrêter; valeurs possibles:" #: distutils/apiref.rst:133 distutils/apiref.rst:537 distutils/apiref.rst:1560 msgid "description" msgstr "description" #: distutils/apiref.rst:135 msgid "*init*" msgstr "*init*" #: distutils/apiref.rst:135 msgid "" "Stop after the :class:`Distribution` instance has been created and " "populated with the keyword arguments to :func:`setup`" msgstr "" "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`" #: distutils/apiref.rst:139 msgid "*config*" msgstr "*config*" #: distutils/apiref.rst:139 msgid "" "Stop after config files have been parsed (and their data stored in the :" "class:`Distribution` instance)" msgstr "" "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`)" #: distutils/apiref.rst:143 msgid "*commandline*" msgstr "*commandline*" #: 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 "" "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`)" #: distutils/apiref.rst:148 msgid "*run*" msgstr "*run*" #: 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 "" "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." #: distutils/apiref.rst:154 msgid "" "In addition, the :mod:`distutils.core` module exposed a number of classes " "that live elsewhere." msgstr "" "De plus, le module :mod:`distutils.core` a exposé un nombre de classe qui " "existent ailleurs." #: distutils/apiref.rst:157 #, fuzzy msgid ":class:`~distutils.extension.Extension` from :mod:`distutils.extension`" msgstr ":class:`Extension` de :mod:`distutils.extension`" #: distutils/apiref.rst:159 #, fuzzy msgid ":class:`~distutils.cmd.Command` from :mod:`distutils.cmd`" msgstr ":class:`Command` de :mod:`distutils.cmd`" #: distutils/apiref.rst:161 #, fuzzy msgid ":class:`~distutils.dist.Distribution` from :mod:`distutils.dist`" msgstr ":class:`Distribution` de :mod:`distutils.dist`" #: distutils/apiref.rst:163 msgid "" "A short description of each of these follows, but see the relevant module " "for the full reference." msgstr "" "Une courte description de chacune d'elle suit, mais consultez le module " "concerné pour une référence complète." #: 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 "" "La class Extension décrit un seul module d'extension C ou C++ dans un script " "d'installation. Elle accepte dans son constructeur les arguments-clés " "suivants" #: 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 "" "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" #: distutils/apiref.rst:183 msgid "*sources*" msgstr "*sources*" #: 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 "" "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" #: distutils/apiref.rst:196 msgid "*include_dirs*" msgstr "" #: distutils/apiref.rst:196 msgid "" "list of directories to search for C/C++ header files (in Unix form for " "portability)" msgstr "" "liste des répertoires où chercher les fichiers d'entêtes C/C++ (en format " "Unix dans un souci de portabilité)" #: distutils/apiref.rst:200 msgid "*define_macros*" msgstr "*define_macros*" #: 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 "" #: distutils/apiref.rst:200 #, fuzzy msgid "a list of tuples" msgstr "une liste de chaînes" #: distutils/apiref.rst:212 msgid "*undef_macros*" msgstr "*undef_macros*" #: distutils/apiref.rst:212 msgid "list of macros to undefine explicitly" msgstr "" #: distutils/apiref.rst:215 msgid "*library_dirs*" msgstr "" #: distutils/apiref.rst:215 msgid "list of directories to search for C/C++ libraries at link time" msgstr "" #: distutils/apiref.rst:219 msgid "*libraries*" msgstr "" #: distutils/apiref.rst:219 msgid "list of library names (not filenames or paths) to link against" msgstr "" #: distutils/apiref.rst:223 msgid "*runtime_library_dirs*" msgstr "" #: 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 "" #: distutils/apiref.rst:229 msgid "*extra_objects*" msgstr "" #: 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 "" #: distutils/apiref.rst:236 msgid "*extra_compile_args*" msgstr "" #: 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 "" #: distutils/apiref.rst:247 msgid "*extra_link_args*" msgstr "" #: 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 "" #: distutils/apiref.rst:256 msgid "*export_symbols*" msgstr "" #: 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 "" #: distutils/apiref.rst:264 msgid "*depends*" msgstr "" #: distutils/apiref.rst:264 msgid "list of files that the extension depends on" msgstr "liste des fichiers dont dépend l'extension" #: distutils/apiref.rst:267 msgid "*language*" msgstr "" #: distutils/apiref.rst:267 msgid "" "extension language (i.e. ``'c'``, ``'c++'``, ``'objc'``). Will be detected " "from the source extensions if not provided." msgstr "" "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é." #: distutils/apiref.rst:277 msgid "" "A :class:`Distribution` describes how to build, install and package up a " "Python software package." msgstr "" #: distutils/apiref.rst:280 msgid "" "See the :func:`setup` function for a list of keyword arguments accepted by " "the Distribution constructor. :func:`setup` creates a Distribution instance." msgstr "" #: distutils/apiref.rst:286 msgid "" "A :class:`Command` class (or rather, an instance of one of its subclasses) " "implement a single distutils command." msgstr "" #: distutils/apiref.rst:291 msgid ":mod:`distutils.ccompiler` --- CCompiler base class" msgstr "" #: distutils/apiref.rst:297 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 "" #: distutils/apiref.rst:303 msgid "This module provides the following functions." msgstr "Ce module fournit les fonctions suivantes." #: distutils/apiref.rst:308 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 "" #: distutils/apiref.rst:317 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 "" #: distutils/apiref.rst:329 msgid "Determine the default compiler to use for the given platform." msgstr "" "Détermine le compilateur par défaut a utiliser par une plateforme donnée" #: distutils/apiref.rst:331 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 "" #: distutils/apiref.rst:335 msgid "" "The default values are ``os.name`` and ``sys.platform`` in case the " "parameters are not given." msgstr "" "Les valeurs par défaut sont ``os.name`` et ``sys.platform`` si les " "paramètres ne sont pas fournis." #: distutils/apiref.rst:341 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 "" #: distutils/apiref.rst:357 msgid "" "Print list of available compilers (used by the :option:`--help-compiler` " "options to :command:`build`, :command:`build_ext`, :command:`build_clib`)." msgstr "" #: distutils/apiref.rst:363 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 "" #: distutils/apiref.rst:367 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 "" #: distutils/apiref.rst:375 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 "" #: distutils/apiref.rst:382 msgid "" "The following methods allow you to manually alter compiler options for the " "instance of the Compiler class." msgstr "" #: distutils/apiref.rst:388 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 "" #: distutils/apiref.rst:395 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 "" #: distutils/apiref.rst:404 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 "" #: distutils/apiref.rst:410 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 "" #: distutils/apiref.rst:418 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 "" #: distutils/apiref.rst:425 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 "" #: distutils/apiref.rst:433 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 "" #: distutils/apiref.rst:440 msgid "" "Add *dir* to the list of directories that will be searched for shared " "libraries at runtime." msgstr "" #: distutils/apiref.rst:446 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 "" #: distutils/apiref.rst:453 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 "" #: distutils/apiref.rst:463 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 "" #: distutils/apiref.rst:473 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 "" #: distutils/apiref.rst:480 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 "" #: distutils/apiref.rst:484 msgid "" "The following methods implement methods for autodetection of compiler " "options, providing some functionality similar to GNU :program:`autoconf`." msgstr "" #: distutils/apiref.rst:490 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 "" #: distutils/apiref.rst:497 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 "" #: distutils/apiref.rst:505 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 "" #: distutils/apiref.rst:513 msgid "" "Return the compiler option to add *dir* to the list of directories searched " "for libraries." msgstr "" #: distutils/apiref.rst:519 msgid "" "Return the compiler option to add *lib* to the list of libraries linked into " "the shared library or executable." msgstr "" #: distutils/apiref.rst:525 msgid "" "Return the compiler option to add *dir* to the list of directories searched " "for runtime libraries." msgstr "" #: distutils/apiref.rst:531 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 "" #: distutils/apiref.rst:537 msgid "attribute" msgstr "attribut" #: distutils/apiref.rst:539 msgid "*compiler*" msgstr "" #: distutils/apiref.rst:539 msgid "the C/C++ compiler" msgstr "" #: distutils/apiref.rst:541 msgid "*linker_so*" msgstr "" #: distutils/apiref.rst:541 msgid "linker used to create shared objects and libraries" msgstr "" #: distutils/apiref.rst:544 msgid "*linker_exe*" msgstr "" #: distutils/apiref.rst:544 msgid "linker used to create binary executables" msgstr "" #: distutils/apiref.rst:546 msgid "*archiver*" msgstr "" #: distutils/apiref.rst:546 msgid "static library creator" msgstr "" #: distutils/apiref.rst:549 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 "" #: distutils/apiref.rst:555 msgid "The following methods invoke stages in the build process." msgstr "" #: distutils/apiref.rst:560 msgid "" "Compile one or more source files. Generates object files (e.g. transforms " "a :file:`.c` file to a :file:`.o` file.)" msgstr "" #: distutils/apiref.rst:563 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 "" #: distutils/apiref.rst:570 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 "" #: distutils/apiref.rst:575 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 "" #: distutils/apiref.rst:581 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 "" #: distutils/apiref.rst:584 msgid "" "*debug* is a boolean; if true, the compiler will be instructed to output " "debug symbols in (or alongside) the object file(s)." msgstr "" #: distutils/apiref.rst:587 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 "" #: distutils/apiref.rst:594 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 "" #: distutils/apiref.rst:599 msgid "Raises :exc:`CompileError` on failure." msgstr "" #: distutils/apiref.rst:604 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 "" #: distutils/apiref.rst:610 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 "" #: distutils/apiref.rst:616 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 "" #: distutils/apiref.rst:620 distutils/apiref.rst:662 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 "" #: distutils/apiref.rst:623 msgid "Raises :exc:`LibError` on failure." msgstr "" #: distutils/apiref.rst:628 msgid "" "Link a bunch of stuff together to create an executable or shared library " "file." msgstr "" #: distutils/apiref.rst:630 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 "" #: distutils/apiref.rst:635 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 "" #: distutils/apiref.rst:642 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 "" #: distutils/apiref.rst:650 msgid "" "*export_symbols* is a list of symbols that the shared library will export. " "(This appears to be relevant only on Windows.)" msgstr "" #: distutils/apiref.rst:653 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 "" #: distutils/apiref.rst:658 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 "" #: distutils/apiref.rst:665 msgid "Raises :exc:`LinkError` on failure." msgstr "" #: distutils/apiref.rst:670 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 "" #: distutils/apiref.rst:677 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 "" #: distutils/apiref.rst:684 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 "" #: distutils/apiref.rst:691 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 "" #: distutils/apiref.rst:698 msgid "Raises :exc:`PreprocessError` on failure." msgstr "" #: distutils/apiref.rst:700 msgid "" "The following utility methods are defined by the :class:`CCompiler` class, " "for use by the various concrete subclasses." msgstr "" #: distutils/apiref.rst:706 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 "" #: distutils/apiref.rst:713 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 "" #: distutils/apiref.rst:721 msgid "" "Returns the name of the object files for the given source files. " "*source_filenames* should be a list of filenames." msgstr "" #: distutils/apiref.rst:727 msgid "" "Returns the name of a shared object file for the given file name *basename*." msgstr "" #: distutils/apiref.rst:732 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 "" #: distutils/apiref.rst:739 msgid "" "Invokes :func:`distutils.util.spawn`. This invokes an external process to " "run the given command." msgstr "" #: distutils/apiref.rst:745 msgid "" "Invokes :func:`distutils.dir_util.mkpath`. This creates a directory and any " "missing ancestor directories." msgstr "" #: distutils/apiref.rst:751 msgid "Invokes :meth:`distutils.file_util.move_file`. Renames *src* to *dst*." msgstr "" #: distutils/apiref.rst:756 msgid "Write a message using :func:`distutils.log.debug`." msgstr "" #: distutils/apiref.rst:761 msgid "Write a warning message *msg* to standard error." msgstr "" #: distutils/apiref.rst:766 msgid "" "If the *debug* flag is set on this :class:`CCompiler` instance, print *msg* " "to standard output, otherwise do nothing." msgstr "" #: distutils/apiref.rst:778 msgid ":mod:`distutils.unixccompiler` --- Unix C Compiler" msgstr "" #: distutils/apiref.rst:784 msgid "" "This module provides the :class:`UnixCCompiler` class, a subclass of :class:" "`CCompiler` that handles the typical Unix-style command-line C compiler:" msgstr "" #: distutils/apiref.rst:787 msgid "macros defined with :option:`-Dname[=value]`" msgstr "" #: distutils/apiref.rst:789 msgid "macros undefined with :option:`-Uname`" msgstr "" #: distutils/apiref.rst:791 msgid "include search directories specified with :option:`-Idir`" msgstr "" #: distutils/apiref.rst:793 msgid "libraries specified with :option:`-llib`" msgstr "" #: distutils/apiref.rst:795 msgid "library search directories specified with :option:`-Ldir`" msgstr "" #: distutils/apiref.rst:797 msgid "" "compile handled by :program:`cc` (or similar) executable with :option:`-c` " "option: compiles :file:`.c` to :file:`.o`" msgstr "" #: distutils/apiref.rst:800 msgid "" "link static library handled by :program:`ar` command (possibly with :program:" "`ranlib`)" msgstr "" #: distutils/apiref.rst:803 msgid "link shared library handled by :program:`cc` :option:`-shared`" msgstr "" #: distutils/apiref.rst:807 msgid ":mod:`distutils.msvccompiler` --- Microsoft Compiler" msgstr "" #: distutils/apiref.rst:813 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 "" #: distutils/apiref.rst:820 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 "" #: distutils/apiref.rst:830 msgid ":mod:`distutils.bcppcompiler` --- Borland Compiler" msgstr "" #: distutils/apiref.rst:835 msgid "" "This module provides :class:`BorlandCCompiler`, an subclass of the abstract :" "class:`CCompiler` class for the Borland C++ compiler." msgstr "" #: distutils/apiref.rst:840 msgid ":mod:`distutils.cygwincompiler` --- Cygwin Compiler" msgstr "" #: distutils/apiref.rst:845 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 "" #: distutils/apiref.rst:852 msgid ":mod:`distutils.emxccompiler` --- OS/2 EMX Compiler" msgstr "" #: distutils/apiref.rst:858 msgid "" "This module provides the EMXCCompiler class, a subclass of :class:" "`UnixCCompiler` that handles the EMX port of the GNU C compiler to OS/2." msgstr "" #: distutils/apiref.rst:863 msgid ":mod:`distutils.archive_util` --- Archiving utilities" msgstr "" #: distutils/apiref.rst:869 msgid "" "This module provides a few functions for creating archive files, such as " "tarballs or zipfiles." msgstr "" #: distutils/apiref.rst:875 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``, ``ztar``, or ``gztar``. *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 "" #: distutils/apiref.rst:887 msgid "" "'Create an (optional compressed) archive as a tar file from all files in and " "under *base_dir*. *compress* must be ``'gzip'`` (the default), " "``'compress'``, ``'bzip2'``, or ``None``. Both :program:`tar` and the " "compression utility named by *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 (:file:`.gz`, :file:`.bz2` or :file:`.Z`). Return the output " "filename." msgstr "" #: distutils/apiref.rst:898 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 "" #: distutils/apiref.rst:906 msgid ":mod:`distutils.dep_util` --- Dependency checking" msgstr "" #: distutils/apiref.rst:912 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 "" #: distutils/apiref.rst:919 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 "" #: distutils/apiref.rst:927 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 "" #: distutils/apiref.rst:936 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 "" #: distutils/apiref.rst:949 msgid ":mod:`distutils.dir_util` --- Directory tree operations" msgstr "" #: distutils/apiref.rst:955 msgid "" "This module provides functions for operating on directories and trees of " "directories." msgstr "" #: distutils/apiref.rst:961 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 "" #: distutils/apiref.rst:972 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 "" #: distutils/apiref.rst:982 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 "" #: distutils/apiref.rst:992 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 "" #: distutils/apiref.rst:1000 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 `_." msgstr "" #: distutils/apiref.rst:1004 msgid "NFS files are ignored." msgstr "" #: distutils/apiref.rst:1010 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 "" #: distutils/apiref.rst:1016 msgid ":mod:`distutils.file_util` --- Single file operations" msgstr "" #: distutils/apiref.rst:1022 msgid "" "This module contains some utility functions for operating on individual " "files." msgstr "" #: distutils/apiref.rst:1027 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 "" #: distutils/apiref.rst:1036 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 "" #: distutils/apiref.rst:1043 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 "" #: distutils/apiref.rst:1057 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 "" #: distutils/apiref.rst:1063 msgid "" "Handles cross-device moves on Unix using :func:`copy_file`. What about " "other systems?" msgstr "" #: distutils/apiref.rst:1069 msgid "" "Create a file called *filename* and write *contents* (a sequence of strings " "without line terminators) to it." msgstr "" #: distutils/apiref.rst:1074 msgid ":mod:`distutils.util` --- Miscellaneous other utility functions" msgstr "" #: distutils/apiref.rst:1080 msgid "" "This module contains other assorted bits and pieces that don't fit into any " "other utility module." msgstr "" #: distutils/apiref.rst:1086 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 "" #: distutils/apiref.rst:1094 msgid "Examples of returned values:" msgstr "" #: distutils/apiref.rst:1096 msgid "``linux-i586``" msgstr "" #: distutils/apiref.rst:1097 msgid "``linux-alpha``" msgstr "" #: distutils/apiref.rst:1098 msgid "``solaris-2.6-sun4u``" msgstr "" #: distutils/apiref.rst:1099 msgid "``irix-5.3``" msgstr "" #: distutils/apiref.rst:1100 msgid "``irix64-6.2``" msgstr "" #: distutils/apiref.rst:1102 msgid "For non-POSIX platforms, currently just returns ``sys.platform``." msgstr "" #: distutils/apiref.rst:1104 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 "" #: distutils/apiref.rst:1108 msgid "" "For universal binary builds on Mac OS X the architecture value reflects the " "univeral 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 univeral build with the i386 " "and x86_64 architectures" msgstr "" #: distutils/apiref.rst:1117 msgid "Examples of returned values on Mac OS X:" msgstr "" #: distutils/apiref.rst:1119 msgid "``macosx-10.3-ppc``" msgstr "" #: distutils/apiref.rst:1121 msgid "``macosx-10.3-fat``" msgstr "" #: distutils/apiref.rst:1123 msgid "``macosx-10.5-universal``" msgstr "" #: distutils/apiref.rst:1125 msgid "``macosx-10.6-intel``" msgstr "" #: distutils/apiref.rst:1130 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 "" #: distutils/apiref.rst:1140 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 "" #: distutils/apiref.rst:1147 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 "" #: distutils/apiref.rst:1151 msgid ":envvar:`HOME` - user's home directory (Unix only)" msgstr "" #: distutils/apiref.rst:1152 msgid "" ":envvar:`PLAT` - description of the current platform, including hardware and " "OS (see :func:`get_platform`)" msgstr "" #: distutils/apiref.rst:1158 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 "" #: distutils/apiref.rst:1165 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 "" #: 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 "" #: 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 "" #: distutils/apiref.rst:1195 msgid "Convert a string representation of truth to true (1) or false (0)." msgstr "" #: 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 "" #: distutils/apiref.rst:1204 msgid "" "Byte-compile a collection of Python source files to either :file:`.pyc` or :" "file:`.pyo` files in the same directory. *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 "" #: distutils/apiref.rst:1209 msgid "``0`` - don't optimize (generate :file:`.pyc`)" msgstr "" #: distutils/apiref.rst:1210 msgid "``1`` - normal optimization (like ``python -O``)" msgstr "" #: distutils/apiref.rst:1211 msgid "``2`` - extra optimization (like ``python -OO``)" msgstr "" #: distutils/apiref.rst:1213 msgid "If *force* is true, all files are recompiled regardless of timestamps." msgstr "" #: 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 "" #: distutils/apiref.rst:1222 msgid "" "If *dry_run* is true, doesn't actually do anything that would affect the " "filesystem." msgstr "" #: 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 "" #: distutils/apiref.rst:1235 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 "" #: distutils/apiref.rst:1245 msgid ":mod:`distutils.dist` --- The Distribution class" msgstr "" #: distutils/apiref.rst:1252 msgid "" "This module provides the :class:`~distutils.core.Distribution` class, which " "represents the module distribution being built/installed/distributed." msgstr "" #: distutils/apiref.rst:1257 msgid ":mod:`distutils.extension` --- The Extension class" msgstr "" #: distutils/apiref.rst:1264 msgid "" "This module provides the :class:`Extension` class, used to describe C/C++ " "extension modules in setup scripts." msgstr "" #: distutils/apiref.rst:1272 msgid ":mod:`distutils.debug` --- Distutils debug mode" msgstr "" #: distutils/apiref.rst:1278 msgid "This module provides the DEBUG flag." msgstr "" #: distutils/apiref.rst:1282 msgid ":mod:`distutils.errors` --- Distutils exceptions" msgstr "" #: distutils/apiref.rst:1288 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 "" #: distutils/apiref.rst:1292 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 "" #: distutils/apiref.rst:1297 msgid "" ":mod:`distutils.fancy_getopt` --- Wrapper around the standard getopt module" msgstr "" #: distutils/apiref.rst:1303 msgid "" "This module provides a wrapper around the standard :mod:`getopt` module " "that provides the following additional features:" msgstr "" #: distutils/apiref.rst:1306 msgid "short and long options are tied together" msgstr "" #: distutils/apiref.rst:1308 msgid "" "options have help strings, so :func:`fancy_getopt` could potentially create " "a complete usage summary" msgstr "" #: distutils/apiref.rst:1311 msgid "options set attributes of a passed-in object" msgstr "" #: distutils/apiref.rst:1313 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 "" #: distutils/apiref.rst:1320 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 "" #: distutils/apiref.rst:1331 msgid "Wraps *text* to less than *width* wide." msgstr "" #: distutils/apiref.rst:1337 msgid "" "The option_table is a list of 3-tuples: ``(long_option, short_option, " "help_string)``" msgstr "" #: distutils/apiref.rst:1340 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 "" #: distutils/apiref.rst:1345 msgid "The :class:`FancyGetopt` class provides the following methods:" msgstr "" #: distutils/apiref.rst:1350 msgid "Parse command-line options in args. Store as attributes on *object*." msgstr "" #: distutils/apiref.rst:1352 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 "" #: distutils/apiref.rst:1364 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 "" #: distutils/apiref.rst:1371 msgid "" "Generate help text (a list of strings, one per suggested line of output) " "from the option table for this :class:`FancyGetopt` object." msgstr "" #: distutils/apiref.rst:1374 msgid "If supplied, prints the supplied *header* at the top of the help." msgstr "" #: distutils/apiref.rst:1378 msgid ":mod:`distutils.filelist` --- The FileList class" msgstr "" #: distutils/apiref.rst:1385 msgid "" "This module provides the :class:`FileList` class, used for poking about the " "filesystem and building lists of files." msgstr "" #: distutils/apiref.rst:1390 msgid ":mod:`distutils.log` --- Simple PEP 282-style logging" msgstr "" #: distutils/apiref.rst:1397 msgid ":mod:`distutils.spawn` --- Spawn a sub-process" msgstr "" #: distutils/apiref.rst:1403 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 "" #: distutils/apiref.rst:1410 msgid ":mod:`distutils.sysconfig` --- System configuration information" msgstr "" #: distutils/apiref.rst:1419 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 "" #: distutils/apiref.rst:1428 msgid "" "Some additional functions are provided which perform some useful " "manipulations for other parts of the :mod:`distutils` package." msgstr "" #: distutils/apiref.rst:1434 msgid "The result of ``os.path.normpath(sys.prefix)``." msgstr "" #: distutils/apiref.rst:1439 msgid "The result of ``os.path.normpath(sys.exec_prefix)``." msgstr "" #: distutils/apiref.rst:1444 msgid "" "Return the value of a single variable. This is equivalent to " "``get_config_vars().get(name)``." msgstr "" #: distutils/apiref.rst:1450 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 "" #: distutils/apiref.rst:1459 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 "" #: distutils/apiref.rst:1467 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 "" #: distutils/apiref.rst:1475 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 "" #: distutils/apiref.rst:1485 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 "" #: distutils/apiref.rst:1494 msgid "" "The following function is only intended for use within the :mod:`distutils` " "package." msgstr "" #: distutils/apiref.rst:1500 msgid "" "Do any platform-specific customization of a :class:`distutils.ccompiler." "CCompiler` instance." msgstr "" #: distutils/apiref.rst:1503 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 "" #: distutils/apiref.rst:1509 msgid "" "This function is even more special-purpose, and should only be used from " "Python's own build procedures." msgstr "" #: distutils/apiref.rst:1515 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 "" #: distutils/apiref.rst:1522 msgid ":mod:`distutils.text_file` --- The TextFile class" msgstr "" #: distutils/apiref.rst:1528 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 "" #: distutils/apiref.rst:1535 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 "" #: distutils/apiref.rst:1542 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 "" #: distutils/apiref.rst:1547 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 "" #: distutils/apiref.rst:1555 msgid "" "The options are all boolean, and affect the values returned by :meth:" "`readline`" msgstr "" #: distutils/apiref.rst:1560 msgid "option name" msgstr "" #: distutils/apiref.rst:1560 msgid "default" msgstr "default" #: distutils/apiref.rst:1562 msgid "*strip_comments*" msgstr "" #: distutils/apiref.rst:1562 msgid "" "strip from ``'#'`` to end-of- line, as well as any whitespace leading up to " "the ``'#'``\\ ---unless it is escaped by a backslash" msgstr "" #: distutils/apiref.rst:1562 distutils/apiref.rst:1571 #: distutils/apiref.rst:1576 msgid "true" msgstr "" #: distutils/apiref.rst:1568 msgid "*lstrip_ws*" msgstr "" #: distutils/apiref.rst:1568 msgid "strip leading whitespace from each line before returning it" msgstr "" #: distutils/apiref.rst:1568 distutils/apiref.rst:1586 #: distutils/apiref.rst:1597 msgid "false" msgstr "" #: distutils/apiref.rst:1571 msgid "*rstrip_ws*" msgstr "" #: distutils/apiref.rst:1571 msgid "" "strip trailing whitespace (including line terminator!) from each line before " "returning it." msgstr "" #: distutils/apiref.rst:1576 msgid "*skip_blanks*" msgstr "" #: distutils/apiref.rst:1576 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 "" #: distutils/apiref.rst:1586 msgid "*join_lines*" msgstr "" #: distutils/apiref.rst:1586 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 "" #: distutils/apiref.rst:1597 msgid "*collapse_join*" msgstr "" #: distutils/apiref.rst:1597 msgid "" "strip leading whitespace from lines that are joined to their predecessor; " "only matters if ``(join_lines and not lstrip_ws)``" msgstr "" #: distutils/apiref.rst:1604 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 "" #: distutils/apiref.rst:1613 msgid "" "Open a new file *filename*. This overrides any *file* or *filename* " "constructor arguments." msgstr "" #: distutils/apiref.rst:1619 msgid "" "Close the current file and forget everything we know about it (including the " "filename and the current line number)." msgstr "" #: distutils/apiref.rst:1625 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 "" #: distutils/apiref.rst:1635 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 "" #: distutils/apiref.rst:1646 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 "" #: distutils/apiref.rst:1652 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 "" #: distutils/apiref.rst:1661 msgid ":mod:`distutils.version` --- Version number classes" msgstr "" #: distutils/apiref.rst:1676 msgid ":mod:`distutils.cmd` --- Abstract base class for Distutils commands" msgstr "" #: distutils/apiref.rst:1683 msgid "This module supplies the abstract base class :class:`Command`." msgstr "" #: distutils/apiref.rst:1688 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 "" #: distutils/apiref.rst:1701 #, fuzzy msgid "" "The class constructor takes a single argument *dist*, a :class:`~distutils." "core.Distribution` instance." msgstr "Une sous classe de :class:`distutils.core.Distribution`" #: distutils/apiref.rst:1706 msgid "Creating a new Distutils command" msgstr "" #: distutils/apiref.rst:1708 msgid "This section outlines the steps to create a new Distutils command." msgstr "" #: distutils/apiref.rst:1710 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 "" #: distutils/apiref.rst:1720 msgid "Subclasses of :class:`Command` must define the following methods." msgstr "" #: distutils/apiref.rst:1724 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 "" #: distutils/apiref.rst:1733 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 "" #: distutils/apiref.rst:1743 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 "" #: distutils/apiref.rst:1752 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 "" #: distutils/apiref.rst:1763 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 "" #: distutils/apiref.rst:1769 msgid ":mod:`distutils.command` --- Individual Distutils commands" msgstr "" #: distutils/apiref.rst:1780 msgid ":mod:`distutils.command.bdist` --- Build a binary installer" msgstr "" #: distutils/apiref.rst:1790 msgid "" ":mod:`distutils.command.bdist_packager` --- Abstract base class for packagers" msgstr "" #: distutils/apiref.rst:1800 msgid ":mod:`distutils.command.bdist_dumb` --- Build a \"dumb\" installer" msgstr "" #: distutils/apiref.rst:1810 msgid "" ":mod:`distutils.command.bdist_msi` --- Build a Microsoft Installer binary " "package" msgstr "" #: distutils/apiref.rst:1817 msgid "Builds a `Windows Installer`_ (.msi) binary package." msgstr "" #: distutils/apiref.rst:1821 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 "" #: distutils/apiref.rst:1828 msgid "" ":mod:`distutils.command.bdist_rpm` --- Build a binary distribution as a " "Redhat RPM and SRPM" msgstr "" #: distutils/apiref.rst:1838 msgid ":mod:`distutils.command.bdist_wininst` --- Build a Windows installer" msgstr "" #: distutils/apiref.rst:1848 msgid ":mod:`distutils.command.sdist` --- Build a source distribution" msgstr "" #: distutils/apiref.rst:1858 msgid ":mod:`distutils.command.build` --- Build all files of a package" msgstr "" #: distutils/apiref.rst:1868 msgid "" ":mod:`distutils.command.build_clib` --- Build any C libraries in a package" msgstr "" #: distutils/apiref.rst:1878 msgid "" ":mod:`distutils.command.build_ext` --- Build any extensions in a package" msgstr "" #: distutils/apiref.rst:1888 msgid "" ":mod:`distutils.command.build_py` --- Build the .py/.pyc files of a package" msgstr "" #: distutils/apiref.rst:1895 msgid "" ":mod:`distutils.command.build_scripts` --- Build the scripts of a package" msgstr "" #: distutils/apiref.rst:1905 msgid ":mod:`distutils.command.clean` --- Clean a package build area" msgstr "" #: distutils/apiref.rst:1910 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 "" #: distutils/apiref.rst:1914 msgid "" "Extension modules built :ref:`in place ` will " "not be cleaned, as they are not in the build directory." msgstr "" #: distutils/apiref.rst:1919 msgid ":mod:`distutils.command.config` --- Perform package configuration" msgstr "" #: distutils/apiref.rst:1929 msgid ":mod:`distutils.command.install` --- Install a package" msgstr "" #: distutils/apiref.rst:1939 msgid "" ":mod:`distutils.command.install_data` --- Install data files from a package" msgstr "" #: distutils/apiref.rst:1949 msgid "" ":mod:`distutils.command.install_headers` --- Install C/C++ header files from " "a package" msgstr "" #: distutils/apiref.rst:1959 msgid "" ":mod:`distutils.command.install_lib` --- Install library files from a package" msgstr "" #: distutils/apiref.rst:1969 msgid "" ":mod:`distutils.command.install_scripts` --- Install script files from a " "package" msgstr "" #: distutils/apiref.rst:1979 msgid "" ":mod:`distutils.command.register` --- Register a module with the Python " "Package Index" msgstr "" #: distutils/apiref.rst:1985 msgid "" "The ``register`` command registers the package with the Python Package " "Index. This is described in more detail in :pep:`301`." msgstr "" #: distutils/apiref.rst:1992 msgid ":mod:`distutils.command.check` --- Check the meta-data of a package" msgstr "" #: distutils/apiref.rst:1998 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 "" #: distutils/builtdist.rst:5 msgid "Creating Built Distributions" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: distutils/builtdist.rst:32 msgid "" "As a simple example, if I run the following command in the Distutils source " "tree::" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/builtdist.rst:70 msgid "The available formats for built distributions are:" msgstr "" #: distutils/builtdist.rst:73 distutils/sourcedist.rst:25 msgid "Format" msgstr "Format" #: distutils/builtdist.rst:73 distutils/setupscript.rst:559 #: distutils/sourcedist.rst:25 distutils/sourcedist.rst:252 msgid "Description" msgstr "Description" #: distutils/builtdist.rst:73 distutils/setupscript.rst:559 #: distutils/sourcedist.rst:25 msgid "Notes" msgstr "Notes" #: distutils/builtdist.rst:75 distutils/sourcedist.rst:29 msgid "``gztar``" msgstr "" #: distutils/builtdist.rst:75 msgid "gzipped tar file (:file:`.tar.gz`)" msgstr "" #: distutils/builtdist.rst:75 distutils/sourcedist.rst:27 msgid "(1),(3)" msgstr "" #: distutils/builtdist.rst:78 distutils/sourcedist.rst:35 msgid "``ztar``" msgstr "" #: distutils/builtdist.rst:78 distutils/sourcedist.rst:35 msgid "compressed tar file (:file:`.tar.Z`)" msgstr "" #: distutils/builtdist.rst:78 distutils/builtdist.rst:81 #: distutils/setupscript.rst:565 distutils/setupscript.rst:567 #: distutils/setupscript.rst:570 distutils/setupscript.rst:572 msgid "\\(3)" msgstr "\\(3)" #: distutils/builtdist.rst:81 distutils/sourcedist.rst:38 msgid "``tar``" msgstr "" #: distutils/builtdist.rst:81 distutils/sourcedist.rst:38 msgid "tar file (:file:`.tar`)" msgstr "" #: distutils/builtdist.rst:83 distutils/sourcedist.rst:27 msgid "``zip``" msgstr "" #: distutils/builtdist.rst:83 distutils/sourcedist.rst:27 msgid "zip file (:file:`.zip`)" msgstr "" #: distutils/builtdist.rst:83 msgid "(2),(4)" msgstr "" #: distutils/builtdist.rst:85 msgid "``rpm``" msgstr "" #: distutils/builtdist.rst:85 msgid "RPM" msgstr "" #: distutils/builtdist.rst:85 distutils/setupscript.rst:581 msgid "\\(5)" msgstr "\\(5)" #: distutils/builtdist.rst:87 msgid "``pkgtool``" msgstr "" #: distutils/builtdist.rst:87 msgid "Solaris :program:`pkgtool`" msgstr "" #: distutils/builtdist.rst:89 msgid "``sdux``" msgstr "" #: distutils/builtdist.rst:89 msgid "HP-UX :program:`swinstall`" msgstr "" #: distutils/builtdist.rst:91 msgid "``wininst``" msgstr "" #: distutils/builtdist.rst:91 msgid "self-extracting ZIP file for Windows" msgstr "" #: distutils/builtdist.rst:91 distutils/setupscript.rst:584 #: distutils/setupscript.rst:587 distutils/sourcedist.rst:35 msgid "\\(4)" msgstr "\\(4)" #: distutils/builtdist.rst:94 msgid "``msi``" msgstr "" #: distutils/builtdist.rst:94 msgid "Microsoft Installer." msgstr "" #: distutils/builtdist.rst:98 distutils/setupscript.rst:594 #: distutils/sourcedist.rst:41 msgid "Notes:" msgstr "Notes : " #: distutils/builtdist.rst:101 distutils/sourcedist.rst:47 msgid "default on Unix" msgstr "" #: distutils/builtdist.rst:104 distutils/sourcedist.rst:44 msgid "default on Windows" msgstr "" #: distutils/builtdist.rst:107 msgid "" "requires external utilities: :program:`tar` and possibly one of :program:" "`gzip`, :program:`bzip2`, or :program:`compress`" msgstr "" #: distutils/builtdist.rst:111 distutils/sourcedist.rst:50 msgid "" "requires either external :program:`zip` utility or :mod:`zipfile` module " "(part of the standard Python library since Python 1.6)" msgstr "" #: distutils/builtdist.rst:115 msgid "" "requires external :program:`rpm` utility, version 3.0.4 or better (use ``rpm " "--version`` to find out which version you have)" msgstr "" #: distutils/builtdist.rst:118 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``, " "``ztar``, ``gztar``, 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 "" #: distutils/builtdist.rst:127 distutils/sourcedist.rst:252 msgid "Command" msgstr "" #: distutils/builtdist.rst:127 msgid "Formats" msgstr "" #: distutils/builtdist.rst:129 msgid ":command:`bdist_dumb`" msgstr "" #: distutils/builtdist.rst:129 msgid "tar, ztar, gztar, zip" msgstr "" #: distutils/builtdist.rst:131 msgid ":command:`bdist_rpm`" msgstr "" #: distutils/builtdist.rst:131 msgid "rpm, srpm" msgstr "" #: distutils/builtdist.rst:133 msgid ":command:`bdist_wininst`" msgstr "" #: distutils/builtdist.rst:133 msgid "wininst" msgstr "" #: distutils/builtdist.rst:135 msgid ":command:`bdist_msi`" msgstr "" #: distutils/builtdist.rst:135 msgid "msi" msgstr "" #: distutils/builtdist.rst:138 msgid "" "The following sections give details on the individual :command:`bdist_\\*` " "commands." msgstr "" #: distutils/builtdist.rst:145 msgid "Creating dumb built distributions" msgstr "" #: distutils/builtdist.rst:154 msgid "Creating RPM packages" msgstr "" #: distutils/builtdist.rst:156 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 "" #: distutils/builtdist.rst:163 msgid "" "The usual way to create an RPM of your module distribution is to run the :" "command:`bdist_rpm` command::" msgstr "" #: distutils/builtdist.rst:168 msgid "or the :command:`bdist` command with the :option:`--format` option::" msgstr "" #: distutils/builtdist.rst:172 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 "" #: distutils/builtdist.rst:179 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 "" #: distutils/builtdist.rst:187 distutils/builtdist.rst:211 msgid "RPM :file:`.spec` file option or section" msgstr "" #: distutils/builtdist.rst:187 msgid "Distutils setup script option" msgstr "" #: distutils/builtdist.rst:189 msgid "Name" msgstr "Nom" #: distutils/builtdist.rst:189 distutils/setupscript.rst:561 msgid "``name``" msgstr "" #: distutils/builtdist.rst:191 msgid "Summary (in preamble)" msgstr "" #: distutils/builtdist.rst:191 distutils/setupscript.rst:577 msgid "``description``" msgstr "" #: distutils/builtdist.rst:193 msgid "Version" msgstr "" #: distutils/builtdist.rst:193 distutils/setupscript.rst:563 msgid "``version``" msgstr "``version``" #: distutils/builtdist.rst:195 distutils/builtdist.rst:218 msgid "Vendor" msgstr "" #: distutils/builtdist.rst:195 msgid "" "``author`` and ``author_email``, or --- & ``maintainer`` and " "``maintainer_email``" msgstr "" #: distutils/builtdist.rst:199 msgid "Copyright" msgstr "Copyright" #: distutils/builtdist.rst:199 distutils/setupscript.rst:591 msgid "``license``" msgstr "" #: distutils/builtdist.rst:201 msgid "Url" msgstr "" #: distutils/builtdist.rst:201 distutils/setupscript.rst:575 msgid "``url``" msgstr "" #: distutils/builtdist.rst:203 msgid "%description (section)" msgstr "" #: distutils/builtdist.rst:203 distutils/setupscript.rst:581 msgid "``long_description``" msgstr "" #: distutils/builtdist.rst:206 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 "" #: distutils/builtdist.rst:211 msgid ":command:`bdist_rpm` option" msgstr "" #: distutils/builtdist.rst:211 msgid "default value" msgstr "" #: distutils/builtdist.rst:214 msgid "Release" msgstr "Version" #: distutils/builtdist.rst:214 msgid "``release``" msgstr "" #: distutils/builtdist.rst:214 msgid "\"1\"" msgstr "" #: distutils/builtdist.rst:216 msgid "Group" msgstr "" #: distutils/builtdist.rst:216 msgid "``group``" msgstr "" #: distutils/builtdist.rst:216 msgid "\"Development/Libraries\"" msgstr "" #: distutils/builtdist.rst:218 msgid "``vendor``" msgstr "" #: distutils/builtdist.rst:218 msgid "(see above)" msgstr "" #: distutils/builtdist.rst:220 msgid "Packager" msgstr "" #: distutils/builtdist.rst:220 #, fuzzy msgid "``packager``" msgstr "*packages*" #: distutils/builtdist.rst:220 distutils/builtdist.rst:222 #: distutils/builtdist.rst:224 distutils/builtdist.rst:226 #: distutils/builtdist.rst:228 distutils/builtdist.rst:230 #: distutils/builtdist.rst:232 distutils/builtdist.rst:234 msgid "(none)" msgstr "" #: distutils/builtdist.rst:222 msgid "Provides" msgstr "" #: distutils/builtdist.rst:222 msgid "``provides``" msgstr "" #: distutils/builtdist.rst:224 msgid "Requires" msgstr "" #: distutils/builtdist.rst:224 msgid "``requires``" msgstr "" #: distutils/builtdist.rst:226 msgid "Conflicts" msgstr "" #: distutils/builtdist.rst:226 msgid "``conflicts``" msgstr "" #: distutils/builtdist.rst:228 msgid "Obsoletes" msgstr "" #: distutils/builtdist.rst:228 msgid "``obsoletes``" msgstr "" #: distutils/builtdist.rst:230 msgid "Distribution" msgstr "" #: distutils/builtdist.rst:230 #, fuzzy msgid "``distribution_name``" msgstr "description" #: distutils/builtdist.rst:232 msgid "BuildRequires" msgstr "" #: distutils/builtdist.rst:232 msgid "``build_requires``" msgstr "" #: distutils/builtdist.rst:234 msgid "Icon" msgstr "" #: distutils/builtdist.rst:234 msgid "``icon``" msgstr "" #: distutils/builtdist.rst:237 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 --no-user-cfg option to setup.py." msgstr "" #: distutils/builtdist.rst:245 msgid "" "There are three steps to building a binary RPM package, all of which are " "handled automatically by the Distutils:" msgstr "" #: distutils/builtdist.rst:248 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 "" #: distutils/builtdist.rst:252 msgid "create the source RPM" msgstr "" #: distutils/builtdist.rst:254 msgid "" "create the \"binary\" RPM (which may or may not contain binary code, " "depending on whether your module distribution contains Python extensions)" msgstr "" #: distutils/builtdist.rst:257 msgid "" "Normally, RPM bundles the last two steps together; when you use the " "Distutils, all three steps are typically bundled together." msgstr "" #: distutils/builtdist.rst:260 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 "" #: distutils/builtdist.rst:288 msgid "Creating Windows Installers" msgstr "" #: distutils/builtdist.rst:290 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 "" #: distutils/builtdist.rst:296 msgid "" "Since the metadata is taken from the setup script, creating Windows " "installers is usually as easy as running::" msgstr "" #: distutils/builtdist.rst:301 msgid "or the :command:`bdist` command with the :option:`--formats` option::" msgstr "" #: distutils/builtdist.rst:305 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 "" #: distutils/builtdist.rst:310 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 "" #: distutils/builtdist.rst:316 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 "" #: distutils/builtdist.rst:322 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 "" #: distutils/builtdist.rst:326 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 "" #: distutils/builtdist.rst:331 msgid "" "The installer file will be written to the \"distribution directory\" --- " "normally :file:`dist/`, but customizable with the :option:`--dist-dir` " "option." msgstr "" #: distutils/builtdist.rst:337 msgid "Cross-compiling on Windows" msgstr "" #: distutils/builtdist.rst:339 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 "" #: distutils/builtdist.rst:344 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 "" #: distutils/builtdist.rst:350 msgid "" "to build a 64bit version of your extension. The Windows Installers also " "support this option, so the command::" msgstr "" #: distutils/builtdist.rst:355 msgid "" "would create a 64bit installation executable on your 32bit version of " "Windows." msgstr "" #: distutils/builtdist.rst:357 msgid "" "To cross-compile, you must download the Python source code and cross-compile " "Python itself for the platform you are targetting - 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 "" #: distutils/builtdist.rst:366 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 "" #: distutils/builtdist.rst:374 msgid "The Postinstallation script" msgstr "" #: distutils/builtdist.rst:376 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 "" #: distutils/builtdist.rst:381 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 "" #: distutils/builtdist.rst:386 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 "" #: distutils/builtdist.rst:390 msgid "" "Some functions especially useful in this context are available as additional " "built-in functions in the installation script." msgstr "" #: distutils/builtdist.rst:397 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 "" #: distutils/builtdist.rst:405 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 "" #: distutils/builtdist.rst:425 msgid "If the folder cannot be retrieved, :exc:`OSError` is raised." msgstr "" #: distutils/builtdist.rst:427 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 "" #: distutils/builtdist.rst:434 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 "" #: distutils/builtdist.rst:445 msgid "Vista User Access Control (UAC)" msgstr "" #: distutils/builtdist.rst:447 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 "" #: distutils/commandref.rst:5 msgid "Command Reference" msgstr "" #: distutils/commandref.rst:22 msgid "Installing modules: the :command:`install` command family" msgstr "" #: 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 "" #: distutils/commandref.rst:35 msgid ":command:`install_data`" msgstr "" #: distutils/commandref.rst:37 msgid "This command installs all data files provided with the distribution." msgstr "" #: distutils/commandref.rst:43 msgid ":command:`install_scripts`" msgstr "" #: distutils/commandref.rst:45 msgid "This command installs all (Python) scripts in the distribution." msgstr "" #: distutils/configfile.rst:5 msgid "Writing the Setup Configuration File" msgstr "" #: 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 "" #: 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 "" #: distutils/configfile.rst:30 msgid "" "installers can override some of what you put in :file:`setup.py` by editing :" "file:`setup.cfg`" msgstr "" #: distutils/configfile.rst:33 msgid "" "you can provide non-standard defaults for options that are not easily set " "in :file:`setup.py`" msgstr "" #: distutils/configfile.rst:36 msgid "" "installers can override anything in :file:`setup.cfg` using the command-line " "options to :file:`setup.py`" msgstr "" #: distutils/configfile.rst:39 msgid "The basic syntax of the configuration file is simple::" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/configfile.rst:117 msgid "" "Note that the ``doc_files`` option is simply a whitespace-separated string " "split across multiple lines for readability." msgstr "" #: distutils/configfile.rst:124 #, fuzzy msgid "inst-config-syntax in \"Installing Python Modules\"" msgstr "Distribuer des Modules Python [en]" #: distutils/configfile.rst:124 msgid "" "More information on the configuration files is available in the manual for " "system administrators." msgstr "" #: distutils/configfile.rst:129 msgid "Footnotes" msgstr "Notes" #: distutils/configfile.rst:130 msgid "" "This ideal probably won't be achieved until auto-configuration is fully " "supported by the Distutils." msgstr "" #: distutils/examples.rst:5 msgid "Examples" msgstr "Exemples" #: 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 "" #: distutils/examples.rst:14 msgid "Distutils Cookbook" msgstr "" #: distutils/examples.rst:15 msgid "" "Collection of recipes showing how to achieve more control over distutils." msgstr "" #: distutils/examples.rst:21 msgid "Pure Python distribution (by module)" msgstr "" #: 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 "" #: 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 "" #: distutils/examples.rst:34 msgid "" "(In all diagrams in this section, ** will refer to the distribution " "root directory.) A minimal setup script to describe this situation would " "be::" msgstr "" #: 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 "" #: 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 "" #: distutils/examples.rst:58 msgid "and the setup script might be ::" msgstr "" #: 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 "" #: distutils/examples.rst:74 msgid "Pure Python distribution (by package)" msgstr "" #: 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 "" #: distutils/examples.rst:83 msgid "The setup script from the last example could also be written as ::" msgstr "" #: distutils/examples.rst:91 msgid "(The empty string stands for the root package.)" msgstr "" #: distutils/examples.rst:93 msgid "" "If those two files are moved into a subdirectory, but remain in the root " "package, e.g.::" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/examples.rst:143 msgid "an appropriate setup script would be ::" msgstr "" #: distutils/examples.rst:152 msgid "" "Or, you might put modules from your main package right in the distribution " "root::" msgstr "" #: distutils/examples.rst:161 msgid "in which case your setup script would be ::" msgstr "" #: distutils/examples.rst:170 msgid "(The empty string also stands for the current directory.)" msgstr "" #: 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 "" #: distutils/examples.rst:188 msgid "then the corresponding setup script would be ::" msgstr "" #: distutils/examples.rst:200 msgid "Single extension module" msgstr "" #: 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 "" #: distutils/examples.rst:211 msgid "" "If the :mod:`foo` extension belongs in the root package, the setup script " "for this could be ::" msgstr "" #: distutils/examples.rst:221 msgid "If the extension actually belongs in a package, say :mod:`foopkg`, then" msgstr "" #: 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 "" #: distutils/extending.rst:5 msgid "Extending Distutils" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: distutils/extending.rst:33 msgid "Integrating new commands" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/extending.rst:88 msgid "Adding new distribution types" msgstr "" #: 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 "" #: distutils/index.rst:5 msgid "Distributing Python Modules" msgstr "Distribuer des Modules Python" #: distutils/index.rst:7 msgid "Greg Ward, Anthony Baxter" msgstr "" #: distutils/index.rst:8 msgid "distutils-sig@python.org" msgstr "distutils-sig@python.org" #: distutils/index.rst:10 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 "" #: distutils/index.rst:17 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 `__ " "in the Python Packaging User Guide for more information." msgstr "" #: distutils/introduction.rst:5 msgid "An Introduction to Distutils" msgstr "" #: 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 "" #: distutils/introduction.rst:16 msgid "Concepts & Terminology" msgstr "" #: 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 "" #: distutils/introduction.rst:23 msgid "write a setup script (:file:`setup.py` by convention)" msgstr "" #: distutils/introduction.rst:25 msgid "(optional) write a setup configuration file" msgstr "" #: distutils/introduction.rst:27 msgid "create a source distribution" msgstr "" #: distutils/introduction.rst:29 msgid "(optional) create one or more built (binary) distributions" msgstr "" #: distutils/introduction.rst:31 msgid "Each of these tasks is covered in this document." msgstr "" #: 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 "" #: distutils/introduction.rst:47 msgid "A Simple Example" msgstr "Un exemple simple" #: 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 "" #: 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 "" #: distutils/introduction.rst:65 msgid "Some observations:" msgstr "" #: distutils/introduction.rst:67 msgid "" "most information that you supply to the Distutils is supplied as keyword " "arguments to the :func:`setup` function" msgstr "" #: 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 "" #: distutils/introduction.rst:74 msgid "" "modules are specified by module name, not filename (the same will hold true " "for packages and extensions)" msgstr "" #: 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 "" #: 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 "" #: distutils/introduction.rst:87 msgid "" "For Windows, open a command prompt windows (:menuselection:`Start --> " "Accessories`) and change the command to::" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/introduction.rst:121 msgid "" "will create an executable installer, :file:`foo-1.0.win32.exe`, in the " "current directory." msgstr "" #: 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 "" #: 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 "" #: distutils/introduction.rst:136 msgid "" "You can find out what distribution formats are available at any time by " "running ::" msgstr "" #: distutils/introduction.rst:145 msgid "General Python terminology" msgstr "" #: 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 "" #: distutils/introduction.rst:155 #, fuzzy msgid "module" msgstr "module" #: 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 "" #: distutils/introduction.rst:160 msgid "pure Python module" msgstr "" #: distutils/introduction.rst:158 msgid "" "a module written in Python and contained in a single :file:`.py` file (and " "possibly associated :file:`.pyc` and/or :file:`.pyo` files). Sometimes " "referred to as a \"pure module.\"" msgstr "" #: distutils/introduction.rst:168 #, fuzzy msgid "extension module" msgstr "module d'extension" #: 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 "" #: distutils/introduction.rst:173 #, fuzzy msgid "package" msgstr "paquet" #: 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 "" #: distutils/introduction.rst:183 #, fuzzy msgid "root package" msgstr "*packages*" #: 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 "" #: distutils/introduction.rst:188 msgid "Distutils-specific terminology" msgstr "" #: distutils/introduction.rst:190 msgid "" "The following terms apply more specifically to the domain of distributing " "Python modules using the Distutils:" msgstr "" #: distutils/introduction.rst:199 #, fuzzy msgid "module distribution" msgstr "description" #: 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 Numeric Python, PyXML, 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 "" #: distutils/introduction.rst:203 msgid "pure module distribution" msgstr "" #: distutils/introduction.rst:202 msgid "" "a module distribution that contains only pure Python modules and packages. " "Sometimes referred to as a \"pure distribution.\"" msgstr "" #: distutils/introduction.rst:207 msgid "non-pure module distribution" msgstr "" #: distutils/introduction.rst:206 msgid "" "a module distribution that contains at least one extension module. " "Sometimes referred to as a \"non-pure distribution.\"" msgstr "" #: distutils/introduction.rst:213 msgid "distribution root" msgstr "" #: 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 "" #: distutils/packageindex.rst:9 msgid "The Python Package Index (PyPI)" msgstr "" #: distutils/packageindex.rst:11 msgid "" "The `Python Package Index (PyPI)`_ stores :ref:`meta-data ` " "describing distributions packaged with distutils, as well as package data " "like distribution files if a package author wishes." msgstr "" #: 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 "" #: distutils/packageindex.rst:21 msgid "PyPI overview" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/packageindex.rst:46 msgid "Distutils commands" msgstr "" #: distutils/packageindex.rst:48 msgid "" "Distutils exposes two commands for submitting package data to PyPI: the :ref:" "`register ` command for submitting meta-data to PyPI and " "the :ref:`upload ` command for submitting distribution " "files. Both commands read configuration data from a special file called a :" "ref:`.pypirc file `." msgstr "" #: distutils/packageindex.rst:58 msgid "The ``register`` command" msgstr "" #: 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 "" #: distutils/packageindex.rst:65 msgid "Distutils will respond with the following prompt::" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: distutils/packageindex.rst:88 msgid "" "See :ref:`package-cmdoptions` for options to the :command:`register` command." msgstr "" #: distutils/packageindex.rst:94 msgid "The ``upload`` command" msgstr "" #: distutils/packageindex.rst:98 msgid "" "The distutils command :command:`upload` pushes the distribution files to " "PyPI." msgstr "" #: distutils/packageindex.rst:100 msgid "" "The command is invoked immediately after building one or more distribution " "files. For example, the command ::" msgstr "" #: distutils/packageindex.rst:105 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 "" #: distutils/packageindex.rst:110 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 "" #: distutils/packageindex.rst:115 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 "" #: distutils/packageindex.rst:120 msgid "" "See :ref:`package-cmdoptions` for additional options to the :command:" "`upload` command." msgstr "" #: distutils/packageindex.rst:127 msgid "Additional command options" msgstr "" #: distutils/packageindex.rst:129 msgid "" "This section describes options common to both the :command:`register` and :" "command:`upload` commands." msgstr "" #: distutils/packageindex.rst:132 msgid "" "The ``--repository`` or ``-r`` option lets you specify a PyPI server " "different from the default. For example::" msgstr "" #: distutils/packageindex.rst:137 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 "" #: distutils/packageindex.rst:142 msgid "See :ref:`pypirc` for more information on defining alternate servers." msgstr "" #: distutils/packageindex.rst:144 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 "" #: distutils/packageindex.rst:155 msgid "The ``.pypirc`` file" msgstr "" #: distutils/packageindex.rst:157 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 "" #: distutils/packageindex.rst:172 msgid "" "The *distutils* section defines an *index-servers* variable that lists the " "name of all sections describing a repository." msgstr "" #: distutils/packageindex.rst:175 msgid "Each section describing a repository defines three variables:" msgstr "" #: distutils/packageindex.rst:177 msgid "repository, that defines the url of the PyPI server. Defaults to" msgstr "" #: distutils/packageindex.rst:178 msgid "``https://www.python.org/pypi``." msgstr "" #: distutils/packageindex.rst:179 msgid "*username*, which is the registered username on the PyPI server." msgstr "" #: distutils/packageindex.rst:181 msgid "password, that will be used to authenticate. If omitted the user" msgstr "" #: distutils/packageindex.rst:181 msgid "will be prompt to type it when needed." msgstr "" #: distutils/packageindex.rst:183 msgid "" "If you want to define another server a new section can be created and listed " "in the *index-servers* variable::" msgstr "" #: distutils/packageindex.rst:201 msgid "" "This allows the :command:`register` and :command:`upload` commands to be " "called with the ``--repository`` option as described in :ref:`package-" "cmdoptions`." msgstr "" #: distutils/packageindex.rst:205 msgid "" "Specifically, you might want to add the `PyPI Test Repository `_ to your ``.pypirc`` to facilitate testing before " "doing your first upload to ``PyPI`` itself." msgstr "" #: distutils/packageindex.rst:213 msgid "PyPI package display" msgstr "" #: distutils/packageindex.rst:215 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 "" #: distutils/packageindex.rst:218 msgid "" "If you use the `reStructuredText `_ syntax for this field, PyPI will parse it and display an HTML output " "for the package home page." msgstr "" #: distutils/packageindex.rst:222 msgid "" "The ``long_description`` field can be attached to a text file located in the " "package::" msgstr "" #: distutils/packageindex.rst:233 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 "" #: distutils/packageindex.rst:236 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 "" #: 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 "" #: distutils/setupscript.rst:5 msgid "Writing the Setup Script" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/setupscript.rst:63 msgid "Listing whole packages" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/setupscript.rst:110 msgid "Listing individual modules" msgstr "" #: 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 "" #: 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 "" #: distutils/setupscript.rst:129 msgid "Describing extension modules" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/setupscript.rst:167 msgid "Extension names and packages" msgstr "" #: 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 "" #: distutils/setupscript.rst:174 msgid "describes an extension that lives in the root package, while ::" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: distutils/setupscript.rst:198 msgid "Extension source files" msgstr "" #: 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 "" #: 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 "" #: distutils/setupscript.rst:214 msgid "" "This warning notwithstanding, options to SWIG can be currently passed like " "this::" msgstr "" #: distutils/setupscript.rst:223 msgid "Or on the commandline like this::" msgstr "" #: 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 "" #: distutils/setupscript.rst:235 msgid "Preprocessor options" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: 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 "" #: distutils/setupscript.rst:291 msgid "For example::" msgstr "Par exemple : ::" #: distutils/setupscript.rst:298 msgid "is the equivalent of having this at the top of every C source file::" msgstr "" #: distutils/setupscript.rst:307 msgid "Library options" msgstr "" #: 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 "" #: 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 "" #: 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 "" #: distutils/setupscript.rst:328 msgid "" "(Again, this sort of non-portable construct should be avoided if you intend " "to distribute your code.)" msgstr "" #: distutils/setupscript.rst:335 msgid "Other options" msgstr "" #: distutils/setupscript.rst:337 msgid "" "There are still some other options which can be used to handle special cases." msgstr "" #: distutils/setupscript.rst:339 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 "" #: distutils/setupscript.rst:343 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 "" #: distutils/setupscript.rst:347 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 "" #: distutils/setupscript.rst:352 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 "" #: distutils/setupscript.rst:358 msgid "Relationships between Distributions and Packages" msgstr "" #: distutils/setupscript.rst:360 msgid "A distribution may relate to packages in three specific ways:" msgstr "" #: distutils/setupscript.rst:362 msgid "It can require packages or modules." msgstr "" #: distutils/setupscript.rst:364 msgid "It can provide packages or modules." msgstr "" #: distutils/setupscript.rst:366 msgid "It can obsolete packages or modules." msgstr "" #: distutils/setupscript.rst:368 msgid "" "These relationships can be specified using keyword arguments to the :func:" "`distutils.core.setup` function." msgstr "" #: distutils/setupscript.rst:371 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 "" #: distutils/setupscript.rst:376 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 "" #: distutils/setupscript.rst:380 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 "" #: distutils/setupscript.rst:387 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 "" #: distutils/setupscript.rst:391 msgid "Let's look at a bunch of examples:" msgstr "" #: distutils/setupscript.rst:394 msgid "Requires Expression" msgstr "" #: distutils/setupscript.rst:394 distutils/setupscript.rst:412 msgid "Explanation" msgstr "" #: distutils/setupscript.rst:396 msgid "``==1.0``" msgstr "" #: distutils/setupscript.rst:396 msgid "Only version ``1.0`` is compatible" msgstr "" #: distutils/setupscript.rst:398 msgid "``>1.0, !=1.5.1, <2.0``" msgstr "" #: distutils/setupscript.rst:398 msgid "" "Any version after ``1.0`` and before ``2.0`` is compatible, except ``1.5.1``" msgstr "" #: distutils/setupscript.rst:402 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 "" #: distutils/setupscript.rst:409 #, fuzzy msgid "Some examples:" msgstr "Quelques exemples : ::" #: distutils/setupscript.rst:412 msgid "Provides Expression" msgstr "" #: distutils/setupscript.rst:414 msgid "``mypkg``" msgstr "" #: distutils/setupscript.rst:414 msgid "Provide ``mypkg``, using the distribution version" msgstr "" #: distutils/setupscript.rst:417 msgid "``mypkg (1.1)``" msgstr "" #: distutils/setupscript.rst:417 msgid "Provide ``mypkg`` version 1.1, regardless of the distribution version" msgstr "" #: distutils/setupscript.rst:421 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 "" #: distutils/setupscript.rst:428 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 "" #: distutils/setupscript.rst:435 msgid "Installing Scripts" msgstr "" #: distutils/setupscript.rst:437 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 "" #: distutils/setupscript.rst:440 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 "" #: distutils/setupscript.rst:448 msgid "" "The ``scripts`` option simply is a list of files to be handled in this way. " "From the PyXML setup script::" msgstr "" #: distutils/setupscript.rst:455 msgid "" "All the scripts will also be added to the ``MANIFEST`` file if no template " "is provided. See :ref:`manifest`." msgstr "" #: distutils/setupscript.rst:462 msgid "Installing Package Data" msgstr "" #: distutils/setupscript.rst:464 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 "" #: distutils/setupscript.rst:469 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 "" #: distutils/setupscript.rst:477 msgid "" "The path names may contain directory portions; any necessary directories " "will be created in the installation." msgstr "" #: distutils/setupscript.rst:480 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 "" #: distutils/setupscript.rst:493 msgid "The corresponding call to :func:`setup` might be::" msgstr "" #: distutils/setupscript.rst:503 msgid "" "All the files that match ``package_data`` will be added to the ``MANIFEST`` " "file if no template is provided. See :ref:`manifest`." msgstr "" #: distutils/setupscript.rst:511 msgid "Installing Additional Files" msgstr "" #: distutils/setupscript.rst:513 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 "" #: distutils/setupscript.rst:517 msgid "" "``data_files`` specifies a sequence of (*directory*, *files*) pairs in the " "following way::" msgstr "" #: distutils/setupscript.rst:526 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 "" #: distutils/setupscript.rst:529 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 "" #: distutils/setupscript.rst:538 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 "" #: distutils/setupscript.rst:544 msgid "" "All the files that match ``data_files`` will be added to the ``MANIFEST`` " "file if no template is provided. See :ref:`manifest`." msgstr "" #: distutils/setupscript.rst:553 msgid "Additional meta-data" msgstr "" #: distutils/setupscript.rst:555 msgid "" "The setup script may include additional meta-data beyond the name and " "version. This information includes:" msgstr "" #: distutils/setupscript.rst:559 msgid "Meta-Data" msgstr "" #: distutils/setupscript.rst:559 msgid "Value" msgstr "Valeur" #: distutils/setupscript.rst:561 msgid "name of the package" msgstr "" #: distutils/setupscript.rst:561 distutils/setupscript.rst:563 #: distutils/setupscript.rst:565 distutils/setupscript.rst:570 #: distutils/setupscript.rst:577 distutils/setupscript.rst:591 msgid "short string" msgstr "" #: distutils/setupscript.rst:561 distutils/setupscript.rst:575 msgid "\\(1)" msgstr "\\(1)" #: distutils/setupscript.rst:563 msgid "version of this release" msgstr "" #: distutils/setupscript.rst:563 msgid "(1)(2)" msgstr "(1)(2)" #: distutils/setupscript.rst:565 msgid "``author``" msgstr "" #: distutils/setupscript.rst:565 msgid "package author's name" msgstr "" #: distutils/setupscript.rst:567 msgid "``author_email``" msgstr "" #: distutils/setupscript.rst:567 msgid "email address of the package author" msgstr "" #: distutils/setupscript.rst:567 distutils/setupscript.rst:572 msgid "email address" msgstr "" #: distutils/setupscript.rst:570 msgid "``maintainer``" msgstr "" #: distutils/setupscript.rst:570 msgid "package maintainer's name" msgstr "" #: distutils/setupscript.rst:572 msgid "``maintainer_email``" msgstr "" #: distutils/setupscript.rst:572 msgid "email address of the package maintainer" msgstr "" #: distutils/setupscript.rst:575 msgid "home page for the package" msgstr "" #: distutils/setupscript.rst:575 distutils/setupscript.rst:584 msgid "URL" msgstr "" #: distutils/setupscript.rst:577 msgid "short, summary description of the package" msgstr "" #: distutils/setupscript.rst:581 msgid "longer description of the package" msgstr "" #: distutils/setupscript.rst:581 msgid "long string" msgstr "" #: distutils/setupscript.rst:584 msgid "``download_url``" msgstr "" #: distutils/setupscript.rst:584 msgid "location where the package may be downloaded" msgstr "" #: distutils/setupscript.rst:587 msgid "``classifiers``" msgstr "" #: distutils/setupscript.rst:587 msgid "a list of classifiers" msgstr "" #: distutils/setupscript.rst:587 distutils/setupscript.rst:589 msgid "list of strings" msgstr "" #: distutils/setupscript.rst:589 msgid "``platforms``" msgstr "" #: distutils/setupscript.rst:589 msgid "a list of platforms" msgstr "" #: distutils/setupscript.rst:591 msgid "license for the package" msgstr "" #: distutils/setupscript.rst:591 msgid "\\(6)" msgstr "\\(6)" #: distutils/setupscript.rst:597 msgid "These fields are required." msgstr "" #: distutils/setupscript.rst:600 msgid "" "It is recommended that versions take the form *major.minor[.patch[.sub]]*." msgstr "" #: distutils/setupscript.rst:603 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 "" #: distutils/setupscript.rst:607 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 `_." msgstr "" #: distutils/setupscript.rst:612 msgid "" "The ``long_description`` field is used by PyPI when you are :ref:" "`registering ` a package, to :ref:`build its home page " "`." msgstr "" #: distutils/setupscript.rst:617 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 "" #: distutils/setupscript.rst:624 #, fuzzy msgid "'short string'" msgstr "une chaîne de caractères" #: distutils/setupscript.rst:624 msgid "A single line of text, not more than 200 characters." msgstr "" #: distutils/setupscript.rst:628 #, fuzzy msgid "'long string'" msgstr "une chaîne de caractères" #: distutils/setupscript.rst:627 msgid "" "Multiple lines of plain text in reStructuredText format (see http://docutils." "sourceforge.net/)." msgstr "" #: distutils/setupscript.rst:631 #, fuzzy msgid "'list of strings'" msgstr "une liste de chaînes" #: distutils/setupscript.rst:631 msgid "See below." msgstr "" #: distutils/setupscript.rst:633 msgid "None of the string values may be Unicode." msgstr "" #: distutils/setupscript.rst:635 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 "" #: distutils/setupscript.rst:647 msgid "0.1.0" msgstr "" #: distutils/setupscript.rst:647 msgid "the first, experimental release of a package" msgstr "" #: distutils/setupscript.rst:650 msgid "1.0.1a2" msgstr "" #: distutils/setupscript.rst:650 msgid "the second alpha release of the first patch version of 1.0" msgstr "" #: distutils/setupscript.rst:652 msgid "``classifiers`` are specified in a Python list::" msgstr "" #: distutils/setupscript.rst:673 msgid "" "If you wish to include classifiers in your :file:`setup.py` file and also " "wish to remain backwards-compatible with Python releases prior to 2.2.3, " "then you can include the following code fragment in your :file:`setup.py` " "before the :func:`setup` call. ::" msgstr "" #: distutils/setupscript.rst:690 msgid "Debugging the setup script" msgstr "" #: distutils/setupscript.rst:692 msgid "" "Sometimes things go wrong, and the setup script doesn't do what the " "developer wants." msgstr "" #: distutils/setupscript.rst:695 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 "" #: distutils/setupscript.rst:703 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 "" #: distutils/sourcedist.rst:5 msgid "Creating a Source Distribution" msgstr "" #: 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 "" #: 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 "" #: distutils/sourcedist.rst:17 msgid "" "You can specify as many formats as you like using the :option:`--formats` " "option, for example::" msgstr "" #: distutils/sourcedist.rst:22 msgid "to create a gzipped tarball and a zip file. The available formats are:" msgstr "" #: distutils/sourcedist.rst:29 msgid "gzip'ed tar file (:file:`.tar.gz`)" msgstr "" #: distutils/sourcedist.rst:29 msgid "\\(2)" msgstr "\\(2)" #: distutils/sourcedist.rst:32 msgid "``bztar``" msgstr "" #: distutils/sourcedist.rst:32 msgid "bzip2'ed tar file (:file:`.tar.bz2`)" msgstr "" #: distutils/sourcedist.rst:54 msgid "requires the :program:`compress` program." msgstr "" #: distutils/sourcedist.rst:56 msgid "" "When using any ``tar`` format (``gztar``, ``bztar``, ``ztar`` or ``tar``) " "under Unix, you can specify the ``owner`` and ``group`` names that will be " "set for each member of the archive." msgstr "" #: distutils/sourcedist.rst:60 msgid "For example, if you want all files of the archive to be owned by root::" msgstr "" #: distutils/sourcedist.rst:68 msgid "Specifying the files to distribute" msgstr "" #: distutils/sourcedist.rst:70 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 "" #: distutils/sourcedist.rst:74 msgid "" "all Python source files implied by the ``py_modules`` and ``packages`` " "options" msgstr "" #: distutils/sourcedist.rst:77 msgid "" "all C source files mentioned in the ``ext_modules`` or ``libraries`` options" msgstr "" #: distutils/sourcedist.rst:83 msgid "" "scripts identified by the ``scripts`` option See :ref:`distutils-installing-" "scripts`." msgstr "" #: distutils/sourcedist.rst:86 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 "" #: distutils/sourcedist.rst:91 msgid "" ":file:`README.txt` (or :file:`README`), :file:`setup.py` (or whatever you " "called your setup script), and :file:`setup.cfg`" msgstr "" #: distutils/sourcedist.rst:94 msgid "" "all files that matches the ``package_data`` metadata. See :ref:`distutils-" "installing-package-data`." msgstr "" #: distutils/sourcedist.rst:97 msgid "" "all files that matches the ``data_files`` metadata. See :ref:`distutils-" "additional-files`." msgstr "" #: distutils/sourcedist.rst:100 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 "" #: distutils/sourcedist.rst:108 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 "" #: distutils/sourcedist.rst:113 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 "" #: distutils/sourcedist.rst:118 msgid "" ":file:`MANIFEST` files start with a comment indicating they are generated. " "Files without this comment are not overwritten or removed." msgstr "" #: distutils/sourcedist.rst:122 msgid "" ":command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in` " "exists, like it did before 2.7." msgstr "" #: distutils/sourcedist.rst:126 msgid "See :ref:`manifest_template` section for a syntax reference." msgstr "" #: distutils/sourcedist.rst:132 msgid "Manifest-related options" msgstr "" #: distutils/sourcedist.rst:134 msgid "" "The normal course of operations for the :command:`sdist` command is as " "follows:" msgstr "" #: distutils/sourcedist.rst:136 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 "" #: distutils/sourcedist.rst:140 msgid "" "if the manifest file doesn't exist or has been previously automatically " "generated, read :file:`MANIFEST.in` and create the manifest" msgstr "" #: distutils/sourcedist.rst:143 msgid "" "if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest " "with just the default file set" msgstr "" #: distutils/sourcedist.rst:146 msgid "" "use the list of files now in :file:`MANIFEST` (either just generated or read " "in) to create the source distribution archive(s)" msgstr "" #: distutils/sourcedist.rst:149 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 "" #: distutils/sourcedist.rst:153 msgid "" "Second, you might just want to (re)generate the manifest, but not create a " "source distribution::" msgstr "" #: distutils/sourcedist.rst:158 msgid ":option:`-o` is a shortcut for :option:`--manifest-only`." msgstr "" #: distutils/sourcedist.rst:163 msgid "The MANIFEST.in template" msgstr "" #: distutils/sourcedist.rst:165 msgid "" "A :file:`MANIFEST.in` file can be added in a project to define the list of " "files to include in the distribution built by the :command:`sdist` command." msgstr "" #: distutils/sourcedist.rst:168 msgid "" "When :command:`sdist` is run, it will look for the :file:`MANIFEST.in` file " "and interpret it to generate the :file:`MANIFEST` file that contains the " "list of files that will be included in the package." msgstr "" #: distutils/sourcedist.rst:172 msgid "" "This mechanism can be used when the default list of files is not enough. " "(See :ref:`manifest`)." msgstr "" #: distutils/sourcedist.rst:176 msgid "Principle" msgstr "" #: distutils/sourcedist.rst:178 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, let's look at the Distutils' own manifest template::" msgstr "" #: distutils/sourcedist.rst:186 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.)" msgstr "" #: distutils/sourcedist.rst:194 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 "" #: distutils/sourcedist.rst:200 msgid "all files in the Distutils \"build\" tree (default :file:`build/`)" msgstr "" #: distutils/sourcedist.rst:202 msgid "" "all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`, :file:" "`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs`" msgstr "" #: distutils/sourcedist.rst:205 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 "" #: distutils/sourcedist.rst:208 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 "" #: distutils/sourcedist.rst:212 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 "" #: distutils/sourcedist.rst:216 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 "" #: distutils/sourcedist.rst:221 msgid "" "include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` " "(standard files)" msgstr "" #: distutils/sourcedist.rst:224 msgid "include :file:`test/test\\*.py` (standard files)" msgstr "" #: distutils/sourcedist.rst:226 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 "" #: distutils/sourcedist.rst:229 msgid "" "include anything matching :file:`\\*.txt` or :file:`\\*.py` in the sub-tree " "under :file:`examples`," msgstr "" #: distutils/sourcedist.rst:232 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 "" #: distutils/sourcedist.rst:237 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 "" #: distutils/sourcedist.rst:241 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 "" #: distutils/sourcedist.rst:247 msgid "Commands" msgstr "" #: distutils/sourcedist.rst:249 msgid "The manifest template commands are:" msgstr "" #: distutils/sourcedist.rst:254 msgid ":command:`include pat1 pat2 ...`" msgstr "" #: distutils/sourcedist.rst:254 msgid "include all files matching any of the listed patterns" msgstr "" #: distutils/sourcedist.rst:257 msgid ":command:`exclude pat1 pat2 ...`" msgstr "" #: distutils/sourcedist.rst:257 msgid "exclude all files matching any of the listed patterns" msgstr "" #: distutils/sourcedist.rst:260 msgid ":command:`recursive-include dir pat1 pat2 ...`" msgstr "" #: distutils/sourcedist.rst:260 msgid "include all files under *dir* matching any of the listed patterns" msgstr "" #: distutils/sourcedist.rst:263 msgid ":command:`recursive-exclude dir pat1 pat2 ...`" msgstr "" #: distutils/sourcedist.rst:263 msgid "exclude all files under *dir* matching any of the listed patterns" msgstr "" #: distutils/sourcedist.rst:266 msgid ":command:`global-include pat1 pat2 ...`" msgstr "" #: distutils/sourcedist.rst:266 msgid "" "include all files anywhere in the source tree matching --- & any of the " "listed patterns" msgstr "" #: distutils/sourcedist.rst:269 msgid ":command:`global-exclude pat1 pat2 ...`" msgstr "" #: distutils/sourcedist.rst:269 msgid "" "exclude all files anywhere in the source tree matching --- & any of the " "listed patterns" msgstr "" #: distutils/sourcedist.rst:272 msgid ":command:`prune dir`" msgstr "" #: distutils/sourcedist.rst:272 msgid "exclude all files under *dir*" msgstr "" #: distutils/sourcedist.rst:274 msgid ":command:`graft dir`" msgstr "" #: distutils/sourcedist.rst:274 msgid "include all files under *dir*" msgstr "" #: distutils/sourcedist.rst:277 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 "" #: distutils/uploading.rst:5 msgid "Uploading Packages to the Package Index" msgstr "" #: distutils/uploading.rst:7 msgid "" "The contents of this page have moved to the section :ref:`package-index`." msgstr "" #~ msgid "The name of the current maintainer, if different from the author" #~ msgstr "Le nom du mainteneur actuel, si différent de l'auteur" #~ msgid "See :mod:`distutils.version`" #~ msgstr "Voir :mod:`distutils.version`" #~ msgid "a URL" #~ msgstr "une URL"