Original Translation
17
Of course, things will not always be that easy. You might be interested in a module distribution that doesn't have an easy-to-use installer for your platform. In that case, you'll have to start with the source distribution released by the module's author/maintainer. Installing from a source distribution is not too hard, as long as the modules are packaged in the standard way. The bulk of this document is about building and installing modules from standard source distributions.
Bien sûr, les choses ne seront pas toujours aussi simple que cela. Vous pourriez être intéressés par une distribution d'un module qui n'a pas de programme d'installation facile à utiliser pour votre plateforme. Dans ce cas, vous allez devoir repartir des fichiers sources publiés par l'auteur/mainteneur du module. L'installation à partir des sources n'est pas très difficile, du moment que les modules en question sont packagés de façon standard. Le cœur de ce document explique comment configurer et installer des modules à partir des sources.
18
The new standard: Distutils
Le nouveau standard: Distutils
19
If you download a module source distribution, you can tell pretty quickly if it was packaged and distributed in the standard way, i.e. using the Distutils. First, the distribution's name and version number will be featured prominently in the name of the downloaded archive, e.g. :file:`foo-1.0.tar.gz` or :file:`widget-0.9.7.zip`. Next, the archive will unpack into a similarly-named directory: :file:`foo-1.0` or :file:`widget-0.9.7`. Additionally, the distribution will contain a setup script :file:`setup.py`, and a file named :file:`README.txt` or possibly just :file:`README`, which should explain that building and installing the module distribution is a simple matter of running ::
Si vous téléchargez une distribution source du module, vous pouvez dire assez rapidement s'il a été packagé et distribué de la façon standard, c'est à dire en utilisant Distutils. Premièrement, le nom et le numéro de version de la distribution seront affichés en bonne place dans le nom de l'archive téléchargée, par exemple :file:`foo-1.0.tar.gz` ou :file:`widget-0.9.7.zip`. Ensuite, l'archive va se décompresser dans un répertoire du même nom : :file:`foo-1.0` ou :file:`widget-0.9.7`. En outre, la distribution va contenir un script d'installation :file:`setup.py` et un fichier nommé :file:`README.txt` ou éventuellement juste :file:`README`, qui doit expliquer que la construction et l'installation de la distribution du module se fait simplement en exécutant ceci ::
20
python setup.py install
python setup.py install
21
If all these things are true, then you already know how to build and install the modules you've just downloaded: Run the command above. Unless you need to install things in a non-standard way or customize the build process, you don't really need this manual. Or rather, the above command is everything you need to get out of this manual.
22
Standard Build and Install
Construction standard et installation
23
As described in section :ref:`inst-new-standard`, building and installing a module distribution using the Distutils is usually one simple command::
Comme décrit dans la section :ref:`inst-new-standard`, la construction et l'installation d'une distribution d'un module en utilisant Distutils est habituellement fait avec la commande ::
24
On Unix, you'd run this command from a shell prompt; on Windows, you have to open a command prompt window ("DOS box") and do it there; on Mac OS X, you open a :command:`Terminal` window to get a shell prompt.
Sous Unix, vous devriez exécuter cette commande à partir d'une invite de shell ; sous Windows, vous devez ouvrir une fenêtre d'invite de commande ("fenêtre DOS") et le faire dedans ; sous Mac OS X, vous ouvrez une fenêtre :command:`Terminal` pour obtenir une invite de shell.
25
Platform variations
Différences selon les plateformes
26
You should always run the setup command from the distribution root directory, i.e. the top-level subdirectory that the module source distribution unpacks into. For example, if you've just downloaded a module source distribution :file:`foo-1.0.tar.gz` onto a Unix system, the normal thing to do is::
Vous devez toujours exécuter la commande "setup" à partir du répertoire racine de la distribution, à savoir le sous-répertoire de niveau supérieur à celui où se sont décompressées les sources de la distribution du module. Par exemple, si vous venez de télécharger les sources d'une distribution du module :file:`foo-1.0.tar.gz` sous un système Unix, la méthode normale consiste à faire ::