18
Packaging – Creating Your Own Libraries or Applications
The chapters thus far have covered how to write, test, and debug Python code. With all of that, there is only one thing that remains: packaging and distributing your Python libraries and applications. To create installable packages, we will use the setuptools
package, which is bundled with Python these days. If you have created packages before, you might remember distribute
and distutils2
, but it is very important to remember that these have been replaced by setuptools
and distutils
and you shouldn’t use them anymore!
We have several types of packages and packaging methods to cover:
- Building new-style packages using the PEP 517/518
pyproject.toml
file - Advanced package building using ...
Get Mastering Python - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.