Transfer from http://www.nowamagic.net/academy/part/13/302/
The current package management tool chain is EASY_INSTALL/PIP + Distribute/setuptools + distutils, which appears to be confusing.
The future combination of toolchain is very simple: Pip + distutils2.
1. Distutils:python comes with a basic installation tool for very simple application scenarios, using:
- Create a setup.py script for the project.
- The setup.py install is performed.
2. Setuptools: A large number of extensions have been made for distutils, especially the inclusion of packet dependency mechanisms. In part of the Python community is already the de facto standard.
3. Distribute: Because Setuptools development is slow, does not support Python 3, code confusion, a bunch of programmers to reinvent the line, refactor the code, add functionality, hoping to replace Setuptools and accepted as the official standard library, they work very hard, In a very short time, the community accepted the distribute.
4. Easy_install:setuptools and distribute have their own installation scripts, that is, once the setuptools or distribute installation is complete, Easy_install will be available. The biggest feature is the automatic discovery of Python's officially maintained package source PyPI, which is handy for installing third-party python packages. Use:
- Setuptools/distribute all just expanded the distutils.
- Easy_install [Package_name] automatically finds/downloads/installs the specified package from PyPI.
5. Pip:pip's goal is very clear – to replace Easy_install. Easy_install has a lot of disadvantages: The installation transaction is non-atomic, it only supports SVN, does not provide the Unload command, and you need to write a script to install a series of packages. Pip solves the above problems, has become a new fact standard, virtualenv and it has become a good pair of partners. Use:
- Installation: Pip install [package_name]
- Uninstall: Pip uninstall [Package_name]
- Support for installing Python packages from any address that can be accessed through the VCS or browser
6. The birth of Distutils2:setuptools and distribute was due to the distutils's incompetence, which in turn led to the current divisive situation. Guido did not accept distribute as the official standard and explained why. Developers are missing out on the new direction and task –distutils2, which will become the standard library packaging for Python 3.3 and appear as DISTUTILS2 in other versions. In other words, it and Pip will join forces to end the current chaotic situation. (But in my search for information, the plan has been shelved.) )
7. Zc.buildout: This is a bloated installation, deployment system, the use of teaching in the Zope community, powerful/complex but limited usage scenarios, unless there is a need, not worth devoting too much effort to research, PIP + virtualenv + Fabric tool chain combination more simple, Flexible.
The relationship between Python package management tools