Issues

Issue #1014 open

make bitbucket support the PyPI protocol (BB-730)

Tarek Ziadé
created an issue

Being able to upload my releases in the /downloads of my bitbucket project using the distutils CLI would be a blast.

I can help for that part if it sounds like a good idea :)

Comments (4)

  1. Tarek Ziadé reporter

    distutils provides an "upload" command that is used to upload an archive at PyPI,

    see http://svn.python.org/projects/python/trunk/Lib/distutils/command/upload.py

    I've made a few changes lately in distutils (Python 2.6) to allow people to use this command with multiple targets, and plone.org is now compatible as well, so basically, pushing a file to plone.org is done like this:

    $ python setup.py upload -r plone.org

    Where plone.org is a section defined in your pypirc file, besides Pypi.

    To be compatible, the server has to implement a simple view located at http://REPOSITORY/file_upload that receives a mulipart form containing the file.

    Distutils knows how to do a basic authentication challenge, by using the stored password located in the pypirc.

    So for a project people could do this to upload their files:

    $ python setup.py upload -r bitbucket.org

    Now the problem is : what happens if the user has several projects and don't want to have a complex pypi file ? What we do at plone.org is a configuration setting in the user profile on server side that maps a project with one or several distutils ids, to decide where to store a file when the user uploads it.

    But that might be a lot of work for a small feature :)

  2. Log in to comment