Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.37 KB

pypi.md

File metadata and controls

50 lines (35 loc) · 1.37 KB

Fairly minimal notes on publishing to PyPI

First, set things up nicely. Check out the .gitignore and setup.py here. The README could be in whatever format, but just use reStructuredText and life will be easier. Make the package in some reasonable way.

With the package set up some reasonable way, it's useful to have it available for testing on the local machine:

python setup.py develop

Second, get set up with a PyPI account. Then you're ready to register the package with PyPI!!

python setup.py register

You can either let the registration step make it, or you can yourself put your username and password in ~/.pypirc. Here's a minimal one:

[server-login]
username:FILL_IN
password:FILL_IN

(You can get away with not keeping a .pypirc for registering, but it didn't seem to work for uploading.)

Now to do an actual release, ensure that everything is in place, make sure version numbers are the right way everywhere, and:

python setup.py sdist upload

That should do it!

I found these references useful in getting up and running: