-
Notifications
You must be signed in to change notification settings - Fork 10
Getting started with nammu for developers
nammu is written mainly in Jython, an implementation of Python that runs on Java.
Currently, nammu requires
- Python 2.7
- Java Runtime Environment 8
- Jython 2.7.0
- a few Python packages listed in the
requirements.txtfile
Check if you can install Java RE 8 with your system's package manager, otherwise it can be downloaded here: https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html.
Also for Jython check if you can install version 2.7.0 with your system's package manager, otherwise you can download it from here: https://www.jython.org/downloads.html. Note: nammu is tested only with Jython 2.7.0, if your package manager provides Jython 2.7.1 (especially on some GNU/Linux distributions), but this will likely not work.
Python 2.7 is probably already installed in your system, but make sure it's the case. We'll describe in the next section how to install the Python packages used by nammu
We recommend using Python's virtual environments for development. One possibility is to use virtualenv. After having installed it, add the following lines to your shell's init script (e.g., .bashrc for the Bash):
export JYTHONPATH="/path/to/nammu/resources/lib:$JYTHONPATH"
export WORKON_HOME=~/.virtualenvs
source /usr/bin/virtualenvwrapper.shThe environment variable WORKON_HOME should point to a directory of your choice where the environments will be saved to (note that you have to create it). The second line loads some shell functions to conveniently work with virtual environments. Double check the path to the virtualenvwrapper.sh is correct.
Open a new shell or source your shell's init script to make sure the settings above take effect. You can now create a virtual environment with the command
$ mkvirtualenv -p jython nammuThe -p option is to select jython as the Python interpreter. After creating the environment, activate it (if it wasn't activated automatically) with the command
$ workon nammuand install the required Python packages with
$ pip install -r requirements.txtIf everything went well, you should be able to run Nammu from a console