Original Translation
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 ::
20
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
23
As described in section :ref:`inst-new-standard`, building and installing a module distribution using the Distutils is usually one simple command::
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.
25
Platform variations
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::
27
gunzip -c foo-1.0.tar.gz | tar xf - # unpacks into directory foo-1.0 cd foo-1.0 python setup.py install
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::