Creating distributable packages with setuptools
The distribution process has often been cited as a major shortcoming for Python; it is an area with a storied history of ever-evolving tools and approaches, often caught between the vestiges of the past and competing visions of the future.
That said, it works surprisingly well, as evidenced by the ease with which we have installed components using pip
throughout this book. The aim of this section is to cut through some of the confusion and provide you with a process that respects both traditional approaches and future trends.
The standard library contains the distutils
library, a collection of functionalities related to packaging and distributing Python code. However, both the distutils
documentation (https://docs.python.org/3/library/distutils.html) and the official packaging guide recommend against using it and instead direct you to use setuptools
.
The setuptools
library is an extension of the distutils
library that adds...