1 Introduction

来源:百度文库 编辑:神马文学网 时间:2024/03/28 20:24:22
1.2 The new standard: Distutils
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. foo-1.0.tar.gz or widget-0.9.7.zip. Next, the archive will unpack into a similarly-named directory: foo-1.0 or widget-0.9.7. Additionally, the distribution will contain a setup script setup.py, and a file named README.txt or possibly just README, which should explain that building and installing the module distribution is a simple matter of running
python setup.py install
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.