Python has an in-build module called distutils that provides tools to distribute Python applications. It provides the following:
1. Skeleton for standard metadata fields like “Author name” and “Source License type”.
2. Helpers – that are programs which know how to build the Python package. They create a set of pre-compiled Python files or a Windows installer.
However distutils is limited to the package itself. It cannot resolve any dependencies – other packages on which your code depends.
setuptools adds a basic dependency resolution system, along with a way to automatically find and download the necessary packages for your code to compile.
It is good practice to write a setuptools wrapper before distributing you source.
Setuptools can be obtained with easy_install
sudo python ez_setup.py setuptools
This will add a new command called easy_install. Packages can now be installed with
sudo easy_install Package_name