Reputation: 3848
Getting to a point with my project that I want to distribute it, so I am reading the docs to better familiarize myself with all the information. Eventually I found myself looking at distutils.core.setup
and all the keywords associated with it and it got me wondering:
What are the keywords used for, where do they go and why do we need them?
After running sdist
on some temporary scaffolding project, I noticed that a PKG-INFO
appeared with some of this metadata in it. But thats the only place I could find them after running the command. There is the upload
command (or I could use twine
) to get the source distribution onto PyPI, so I suppose maybe its a convention used to pass information that is then parsed and loaded onto the PyPI web page for the distribution?
Upvotes: 1
Views: 341
Reputation: 21520
so I suppose maybe its a convention used to pass information that is then parsed and loaded onto the PyPI web page for the distribution?
You're precisely right. Most of these keywords represent various core metadata fields that define all Python package distributions.
These path of this data is roughly this:
setup
function;PKG-INFO
file when building a distribution;twine
reads from PKG-INFO
to determine all the metadata about your distribution;twine
uploads this metadata along with your .zip
, .tar.gz
or .whl
fileUpvotes: 2