I know this is what it needs to publish your project to pypi
$ python setup.py register -r pypi
$ python setup.py sdist upload -r pypi
$ python setup.py bdist_wheel upload -r pypi
Should I register every time before uploading to pypi? Or just the first time? Thank you.
Now I can confirm the answer is: Yes, always
If you don't register, pypi will not allow you to upload. And you can't register with the same version number, this is not allowed either, which means you should modify version number in setup.py
before registering and uploading.
What if I don't want to change version but need to modify code?
Here's a solution:
Suppose the previous version is 0.0.1
, then you can use 0.0.1.post1
and pypi will happily accept this.
Here's 0.0.1.post1
version of my ezcf package on pypi, as you can see it is a valid version number.
https://pypi.python.org/pypi/ezcf/0.0.1.post1