Page 78 -
P. 78
ready for distribution
A quick review of your distribution
Thanks to Python’s distribution utilities, your module has been transformed into
a distribution and installed into your local copy of Python.
You started with a single function, which you entered into a file called
nester.py, creating a module. You then created a folder called nester
to house your module. The addition of a file called setup.py to your
folder allowed you to build and install your distribution, which has resulted
in a number of additional files and two new folders appearing within
your nester folder. These files and folders are all created for you by the
distribution utilities.
Before Setup After Setup
nester nester
Your code is in A list of files in
this file. your distribution is
in this file.
nester.py MANIFEST
Here are your
setup.py
new folders.
Your metadata is build
in this file.
lib Your code is
in this file.
nester.py
dist
This is your
distribution package.
Your code is in nester-1.0.0.tar.gz
this file.
nester.py
nester.pyc A “compiled” version
of your code is in
setup.py this file.
Your metadata is
in this file.
42 Chapter 2