Package: collective.dist
ContentsWhat is collective.dist ?How to use collective.dist ?Making sure your package metadata are fineWhat is collective.dist ?I have added in Python 2.6 a new feature to allow people
to deal with several PyPI-like servers in.pypirc.Basically you can useregisteranduploadcommands on any server
registered in.pypirc, which changed a bit.But Plone and Zope runs on Python 2.4.So this package adds two new commands so you can use what will be
available in Python 2.6:mupload: command that allows uploading the package to several serversmregister: command that allow registering to several serversThis package also provides some new commands that will be introduced
in Python 2.7:check: command that allows you to check if the metadata are compliant.
It checks for example that long_description compiles in reSt.
Notice thatmregistercalls this command.How to use collective.dist ?mregisterandmuploadare replacingregisteranduploadcommands
and work with an extended version of the.pypircfile.In order to work with it, change your.pypircfile this way:[distutils]
index-servers =
    pypi

[pypi]
username:user
password:passwordWhereuserandpasswordare yourPyPIusers.With the latest changes, ifpasswordis omitted the user will be prompt
to type it when needed.You can then start to use themregisterandmuploadcommands, instead
of the usualregisteranduploadcalls.A typical call to upload your file would be:$ python setup.py mregister sdist muploadTo deal with several PyPI-like servers, you can add them in your.pypircfile.For example, if you want to be able to push your packages to :PyPIplone.orgyour own private PyPI (by using PloneSoftwareCenter for example)You can write your.pypircfile like this:[distutils]
index-servers =
    pypi
    plone.org
    mycompany


[pypi]
username:user
password:password

[plone.org]
repository:http://plone.org/products
username:ploneuser
password:password

[plone.org]
repository:http://my.company/products
username:user
password:passwordFrom there, you will be able to work with the different servers,
with the-roption:$ python setup.py mregister sdist mupload -r http://plone.orgYou can even use the section name instead of the url:$ python setup.py mregister sdist mupload -r plone.orgIf your package uses setuptools, you can even create aliases to simplify
the command:$ python setup.py alias plone_release mregister sdist mupload -r plone.org  # creates the alias
$ python setup.py plone_release # run the whole sequenceAnother usage is to deal with several profiles on PyPI itself:[distutils]
index-servers =
    pypi
    pypi-personal

[pypi]
username:user
password:password

[pypi-personal]
username:user2
password:password2Making sure your package metadata are fineYou can check if your metadata are compliant by running thecheckcommand:$ python setup.py checkIf you have docutils installed, you can even check if yourlong_descriptioncompiles, with the restructuredtext option:$ python setup.py check --restructuredtextAnd make it raise an error in case of a problem with the strict option:$ python setup.py check --restructuredtext --strictNotice thatmregistercallscheckand check for reStructuredText.
If you want to make it stop when the reStructuredText is broken, usestrictas well:$ python setup.py mregister --strict