Skip to content

Rebuild Python package for PyPi and republish

Louis Maddox edited this page Jan 5, 2020 · 12 revisions

After incrementing the package version number in setup.py, run the following to remove old distribution archives, regenerate them, and then reupload them to PyPi:

EGG_INFO=$(find ./ -iname "*.egg-info");
if [ -d "$EGG_INFO" ]; then
    rm -rf "$EGG_INFO";
fi;
rm -rf build/ dist/;
python3 setup.py sdist bdist_wheel;
python3 -m twine upload dist/*

Source: https://packaging.python.org/tutorials/packaging-projects/

Clone this wiki locally