|
Original |
Translation |
|
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
|
|
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 ::
|
|
27
|
|
28
|
On Windows, you'd probably download :file:`foo-1.0.zip`. If you downloaded the archive file to :file:`C:\\Temp`, then it would unpack into :file:`C:\\Temp\\foo-1.0`; you can use either a archive manipulator with a graphical user interface (such as WinZip) or a command-line tool (such as :program:`unzip` or :program:`pkunzip`) to unpack the archive. Then, open a command prompt window ("DOS box"), and run::
|
Sous Windows, vous avez probablement téléchargé :file:`foo-1.0.zip`. Si vous avez téléchargé le fichier d'archive dans :file:`C:\Temp`, il se décompressera alors dans :file:`C:\Temp\foo-1.0` ; vous pouvez utiliser soit un manipulateur d'archive avec une interface graphique (comme WinZip) soit un outil de ligne de commande (telles que :program:`unzip` ou :program:`pkunzip`) pour décompresser l'archive. Ensuite, ouvrez une fenêtre d'invite de commandes ("fenêtre DOS") et exécutez ::
|
|
29
|
cd c:\Temp\foo-1.0 python setup.py install
|
cd c:\Temp\foo-1.0 python setup.py install
|
|
30
|
|
Fractionnement du travail
|
|
31
|
Running ``setup.py install`` builds and installs all modules in one run. If you prefer to work incrementally---especially useful if you want to customize the build process, or if things are going wrong---you can use the setup script to do one thing at a time. This is particularly helpful when the build and install will be done by different users---for example, you might want to build a module distribution and hand it off to a system administrator for installation (or do it yourself, with super-user privileges).
|
Exécuter ``setup.py install`` construit et installe tous les modules en un seul coup. Si vous préférez travailler progressivement -- ce qui est particulièrement utile si vous souhaitez personnaliser le processus de construction, ou si les choses vont mal -- vous pouvez utiliser le script de configuration pour faire une chose à la fois. Cela est particulièrement utile lorsque la construction et l'installation doit être faite par différents utilisateurs -- par exemple, vous pouvez vouloir construire une distribution d'un module et la transférer à un administrateur système pour l'installation (ou le faire vous-même, avec les privilèges de super-utilisateur).
|