If you want to hack on Mojo, get a copy of the source code with:
$ bzr branch lp:mojo
Then it can be installed with:
$ python setup.py install --user
against a branch of Mojo to install it into your $HOME/.local
You may need to check that $HOME/.local/bin is on your $PATH or add it:
An alternative method of installation is to install in development mode with:
$ python setup.py develop --user
which makes changes to the project source immediately available without having to install again.
Yet another method is to use virtualenv, so that multiple versions of mojo can be installed at the same time:
$ virtualenv --system-site-packages env $ source env/bin/activate $ pip install -r requirements.txt $ python setup.py develop
You'll need a few python packages installed in order to install Mojo.
$ sudo apt-get install python-setuptools python-apt
You can install codetree in a similar way after grabbing lp:codetree.
$ bzr branch lp:codetree $ cd codetree $ python setup.py install --user
For running the test suite you will need python-nose and python-coverage and python-flake8 for the lint tests.
See the README's FAQ for further tips/gotchas.
It helps to have the sudoers file installed to reduce the number of times your sudo password is asked for.
$ sudo useradd -r -m mojo $ sudo install -o root -g root -m 0440 contrib/99-mojo-sudoers /etc/sudoers.d $ sudo usermod -aG mojo $USER
To build an updated version of the mojo package:
- Ensure the name of the directory you're using is "mojo" (debian packaging will look for this).
- Increment the version in ./setup.py.
make deb-src. If you need to rerun for some reason (missing dependencies, etc.), just re-run
debuild -S -sa -I.bzrfrom the debian directory, as
make debwill update the changelog again.
- Upload the .changes file from a directory level above the Makefile dput ppa:$MY-PPA/ppa mojo$versionsource.changes
- Commit setup.py and debian/changlog.