10 June, 2017
Caveat! This is mostly me cargo-culting what worked for me. The docs
suggest using twine
, which I couldn’t get to work.
I’m assuming you’ve got a nice python package, a working
setup.py
, and are ready to release version 0.1 of
foo
on pypi:
python setup.py sdist
, to generate the
foo.egg-info/
directory. Inside should be
PKG-INFO
.python setup.py bdist_wheel
, to generate
build/
, which can be ignored, and dist/
.
Inside dist/
are the python wheel
(foo-0.1-py2.py3-none-any.whl
) and the source distribution
(foo-0.1.tar.gz
)PKG-INFO
.pip install foo
to make sure nothing went wrong!Note that if you make even a tiny change to anything, you’ll need to upload a new release, so probably make sure you’re happy before you start.