Hello, Working with several PyPI servers is making the command lines quite long and hard to keep up.
For instance, If I want to upload an egg on two servers I have to do this: $ python setup.py register sdist bdist_egg upload -r http://my.cool.server/ $ python setup.py register sdist bdist_egg upload -r http://pypi.python.org/pypi Brrrr.... :) The setuptools `alias` command make things easier, but we still need to add in setup.cfg these alias, and have to call several commands to commit just one egg to several places. I would like to propose a new command in distutils to make things easier. This proposal is based on the `.pypirc` syntax of my previous proposal (http://wiki.python.org/moin/EnhancedPyPI) 1. Defining releasing strategies for each repository For each repository, we could add `release` value to tell distutils the sequence to be run when `release` is called:: [distutils] index-servers = pypi my-other-server my-other-server-with-its-own-realm [pypi] repository:http://pypi.python.org/pypi/ username:tarek2 password:secret release:register sdist build_mo bdist_egg upload release-strategy : * [my-other-server] username:tarek2 password:secret repository:http://example.com/repository release:register sdist build_mo bdist_egg upload release-strategy: acme.* specific.package [my-other-server-with-its-own-realm] username:tarek3 password:secret3 repository:http://example2.com/repository realm:acme release:register sdist build_mo bdist_egg upload release-strategy: acme.* acme2.* The `release-strategy` value would be a set of glob-like expressions that will be used to match the package being released, in order to qualify it for the given repository. - when `release` is not provided, the repository is ommited by the release command - when `release` is provided, but not `release-strategy`, the default value for `release-strategy` would be * Of course these are just optional shorcuts 2. Making a release This call: $ cd acme.package $ python setup.py release Would then look in .pypirc where "acme.package" (defined in the package meta-data name) needs to be released, and will do this equivalent sequence: $ python setup.py register sdist build_mo bdist_egg upload -r pypi $ python setup.py register sdist build_mo bdist_egg upload -r my-other-server-with-its-own-realm The interesting thing about glob expressions is that it allows setting a release strategy upon the namespaces. For example, it makes it possible to upload the eggs of a given company to a dedicated server, and defines specific eggs to be released at pypi. Tarek
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig