Search code examples
pythonpackagebitbucketeasy-installpypi

Is it possible just to update the details in the pypi index, without recreating package?


I'm developing a python package in bitbucket and would like to index it in pypi. The operations I do whenever I have a new download seems quite inefficient, which trigger this question.

  1. I've uploaded a new package into pypi using
    python setup.py register sdist upload
  2. Then I've configured the new package also to appear in bitbucket's downloads.
  3. Now I want to update the pypi download URL to point at bitbucket.

Can (3) be done after I've done (1),(2) without recreating the package?
What is the proper way to do so without generating the package twice?


Solution

  • PyPi meta-data changes can be done by simply redoing the python setup.py register step again, so you can simply edit your setup.py to change the download URL and then repeat the registration step.

    Keep in mind that automated install tools like easy_install, pip, etc. can generally scan a page linked to by the download url for the latest downloadable distribution (according to version numbering standards) so you don't need to explicitly link to your distribution file.

    If you're going to do this, I also recommend you manually go to PyPi and delete or hide the old source distribution you've uploaded so that new users don't get a version containing the old setup.py.