|
Original |
Translation |
|
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::
|
|
|
29
|
cd c:\Temp\foo-1.0 python setup.py install
|
|
|
30
|
|
|
|
31
|
|
32
|
For example, you can build everything in one step, and then install everything in a second step, by invoking the setup script twice::
|
|
|
33
|
python setup.py build python setup.py install
|
|
|
34
|
If you do this, you will notice that running the :command:`install` command first runs the :command:`build` command, which---in this case---quickly notices that it has nothing to do, since everything in the :file:`build` directory is up-to-date.
|
|
|
35
|
You may not need this ability to break things down often if all you do is install modules downloaded off the 'net, but it's very handy for more advanced tasks. If you get into distributing your own Python modules and extensions, you'll run lots of individual Distutils commands on their own.
|
|
|
36
|
|
|