A guide for updating packages on PyPi

后端 未结 2 641
萌比男神i
萌比男神i 2020-12-28 08:45

I used this guide to install a new package on PyPi.

Now, I want to update the package. Since I found no guide for this, I tried to do it myself: I updated the versi

2条回答
  •  臣服心动
    2020-12-28 09:28

    I found out what my problem was - I did not delete the old files in the dist folder, so the uploader tried to upload them before the new files, and failed. The solution was to:

    a. Delete all files in the dist folder.

    b. Update the version number in the setup.py file.

    c. Re-create the wheels:

    python3 setup.py sdist bdist_wheel
    

    d. Re-upload the new files:

    twine upload dist/*
    

提交回复
热议问题