Closed tripleee closed 5 years ago
https://docs.python.org/3.1/distutils/packageindex.html#pypirc explains what you need in your .pypirc
and how to add multiple repositories if you need to. With that in place, run python3 setup.py register
in the BotpySE directory to log in to PyPI with your PyPI password.
https://packaging.python.org/guides/making-a-pypi-friendly-readme/ describes how to use twine
instead of the legacy setup.py upload
mechanism, but it requires some changes which we will probably want to discuss before plunging ahead. In particular, it advocates switching from distutils
to setuptools
as a prerequisite. (I say go for it.)
For baking a new release, updated version
in setup.py
and added an entry in the Changelog
section in README.md
.
git add setup.py README.md
# Check that nothing odd slipped in
git diff --cached
git commit -m "Release 0.7.7"
git tag -am "0.7.7" 0.7.7
Version 0.7.6 does not seem to have a tag assigned to it, and 0.7.5 has the tag "0.7.4 (delayed)". Should those releases be tagged retroactively?
I ran into https://github.com/pypa/setuptools/issues/941 but what eventually worked for me was to remove the repository:
declaration from my .pypirc
file. I tried the upload.../legacy/
URL there too at first, but that didn't help. Also the example syntax in the PR is wrong or at least different (all the official examples have colons, not equals signs, after username
and password
).
Calling this done. Let's create a new ticket if we switch to Twine.
@tripleee Yeah, about the GH Tags... I believe I forgot to add the 0.7.6 tag, and there was a messy up in 0.7.4 and 0.7.5, probably leading to the error. It's probably best to just push a tag everytime there is a PyPi release.
Just to add the missing piece, the final command after you commit (and push!) is
python3 setup.py sdist upload
Ashish left some useful notes in https://github.com/SOBotics/Botpy/pull/22#issuecomment-486909247 but I'm creating a separate ticket to make these easier to find in the future, and adding a few notations of my own here.