Skip to content

Building the pip package

Abbas Razaghpanah edited this page Apr 6, 2015 · 4 revisions

Centinel Packaging

There are currently 2 packages for Centinel. centinel (the stable build matched to our release cycle) and centinel-dev (pushed 1-2 times per week). Sathya's account on PyPI has registered the centinel package and our ICLab account is registered to push the centinel-dev package

Building our Package with pip

For now, Sathya and Ben will build the packages as needed. However, if you do need to build the centinel-dev package, follow these steps:

  1. Checkout the dev branch and pull all of the changes from the master branch in git with git fetch origin; git checkout dev; git pull --rebase origin master
  2. Update the version number in the dev branch (make sure you would also send iclab/centinel a pull request with the new distro version after you build (but don't commit to dev-> create a feature branch on your fork))
  3. Build the package locally with python setup.py sdist bdist_egg (this builds a source distribution (tar archive) and a binary distribution (egg)). This build doesn't include any experiments in the package.
  4. Test that the package works by copying the package to a VM, extracting it, installing it, and testing it. This might look something like
sudo pip uninstall centinel-dev;
tar -xzvf centinel-dev-0.1.4.4.tar.gz;
cd centinel-dev-0.1.4.4;
sudo python setup.py install;
centinel-dev;
centinel-dev --sync

If everything works correctly and the results are uploaded, then everything is gravy and the package is ok. 4. Upload the package to PyPI with twine upload dist/*. You will also need our account credentials and have installed twine (this lets us upload over HTTPS)

Note: always update the version in the master branch instead of dev. This will save you some headache when rebasing (otherwise you'll encounter one conflict per version bump for setup.py and centinel/__init__.py).