Uploading to PyPI - aiidateam/disk-objectstore GitHub Wiki
Instructions on how to upload a package on PyPi
Since I always forget, here are some instructions.
Only once
-
pip install twine(only once) -
create
~/.pypirc:[distutils] index-servers = pypi pypitest [pypi] username=gio.piz [pypitest] repository=https://testpypi.python.org/pypi username=gio.piz
Commits and tags in the code
- First, update
__version__in the code - create a new tag 'vX.X.X' from the commit in the main branch after ensuring that all tests pass (remember to push the tag as well!)
Then:
Update pip
-
clear the
build/,distanddisk-objectstore.egg-infofolders -
git fetch --allandgit checkout vX.Y.Z(checking out the tag to be sure of the version we are at) -
python setup.py sdist bdist_wheel --universal -
upload the package
twine upload dist/*
(to test:
pip install disk-objectstore)
Create a release on GitHub
Make sure to also create a new release on GitHub, based on the last tag