Understanding distutils

The distutils package was introduced in Python 1.6 to standardize the process of building and installing third-party Python libraries.

The main work when using distutils is creating the setup script, which, by convention, is called setup.py. This small Python program describes to distutils the files that need to be in the distribution and gives additional information like version numbers, author name, and so on.

The setup script tells distutils to bundle the necessary files (which might be Python code, C source files, or other data files) and generate whatever kind of distribution package you want. Your distribution type can range from an ordinary ZIP file to a full-blown Linux RPM or Windows installer.

In This Chapter

Understanding distutils

Other distutils features

Distributing extension modules

Creating source and binary distributions

Building standalone executables

0 0

Post a comment