Python Packaging


We rely on two Python Package Index (PyPI): and is a mirror of the official PyPI, It is based on collective.eggproxy. We use this mirror as a proxy cache for our external dependencies. includes c2cgeoportal and tileforge eggs (and possibly other private eggs in the future). It is based on CheesePrism. To access this PyPI a login/password is required.

The buildout configurations of c2cgeoportal applications use index and find-links to reference these Package Index:

index =
find-links =

c2cgeoportal releases

Releasing c2cgeoportal means creating a source distribution of c2cgeoportal and uploading it to

pypirc configuration

To be able to upload distributions to the Camptocamp internal PyPI it is required to have an appropriate (e.g. [c2c-internal]) section in ~/.pypirc:

index-servers =


Build c2cgeoportal

Creating c2cgeoportal distributions requires building c2cgeoportal. This is done using Buildout:

$ buildout/bin/buildout -c buildout_dev.cfg

Create and upload development distributions

We want to be able to create and upload development distributions.

To create and upload a development distribution just run the following command:

$ buildout/bin/python sdist upload -r c2c-internal

As you can see the name of a development distribution includes a dev pre-release tag and a date post-release tag. This is by convention.

c2c-internal in the name of the section you added in ~/.pypirc for the Camptocamp internal index.


Never upload distributions including code that is not in the master branch of the GitHub repository. So push before distributing!

Create and upload release distributions

By default sdist produces development distributions (see the [egg_info] options in setup.cfg). To create release distributions specific options are required on the command line:

$ buildout/bin/python egg_info --no-date --tag-build "" sdist upload -r c2c-internal

The important note of the previous section applies here too, obviously.

Then tag the code that’s released:

$ git tag <c2cgeoportal_version>
$ git push origin <c2cgeoportal_version>

origin or whatever name you have for the remote.


Once a release distribution has been uploaded, you should bump the current version of c2cgeoportal in Actually, next development version should have a higher version than the current stable one.

Release checklist

Before releasing:

  • make sure all the tests pass
  • make sure the version number is correct in
  • make sure you don’t have uncommitted/unpushed changes