Retracing the origins of Python packaging
The Python packaging landscape is a vast graveyard of failed attempts and abandoned tools. Best practices around dependency management change often within the Python community and the recommended solution one year may be a broken nonstarter the next. As you research this topic, remember to look at when the information was published and do not trust any advice that may be out of date.
Most Python libraries are distributed using distutils
or setuptools
, including all the packages found on the Python Package Index (PyPI). Both distribution methods rely on a setup.py
project specification file that the package installer for Python (pip) uses to install a package. pip
can also generate or freeze a precise list of dependencies after
a project is installed. This optional requirements.txt
file is used by pip
in conjunction with setup.py
to ensure that project installations are repeatable.
distutils
distutils is the original packaging system...