-
Notifications
You must be signed in to change notification settings - Fork 17
Building the pip package
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
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:
- 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
- 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))
- 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. - 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
).