Reputation: 17243
In order to upload my package to PyPI, I'm using:
python setup.py sdist bdist_wheel
twine upload dist/*
Now I would like to upload an updated version.
Should I simply run the same commands? The old dist files are still in the dist
directory.
Is the good practice to first clean dist/
and then build and upload? If so, what is the cleanest way to do so?
EDIT: Things seem to work by simply doing twine upload --skip-existing dist/*
. Is there a better option?
Upvotes: 2
Views: 1007
Reputation: 95038
Is the good practice to first clean dist/ and then build and upload?
Yes.
rm -rf build dist *.egg-info
PS. I usually do this cleanup immediately after release. See my release scripts for examples (SQLObject, CheetahTemplate, my small projects)
Upvotes: 5