-
Notifications
You must be signed in to change notification settings - Fork 45
PyPiInstructions
Since I always forget, here are some instructions.
-
pip install twine
(only once) -
create
~/.pypirc
:[distutils] index-servers = pypi pypitest
[pypi] repository=https://pypi.python.org/pypi username=gio.piz
[pypitest] repository=https://testpypi.python.org/pypi username=gio.piz
- First, update
__version__
in the code - commit and create a new tag 'vX.X.X' (remember to push it)
- merge also into
master
.
Then:
-
clear the
build/
,dist
andseekpath.egg-info
folders -
git pull
(possibly then checking out the tag to be sure of the version we are at) -
python setup.py sdist bdist_wheel --universal
-
register project version (here for test PyPi):
twine register -r pypitest dist/seekpath-X.X.X.tar.gz
twine register -r pypitest dist/seekpath-X.X.X-py2.py3-none-any.whl
-
upload the package
twine upload -r pypitest dist/*
-
to test:
pip install -i https://testpypi.python.org/pypi seekpath
If all works, do the same on the main repo (remove -r
options or -i
options of pip).
(Note: often the last step might not work if one of the packages in the dependencies is not in testpypi...)