Installing the Library

Using Pip

The SHIP Library can be easily installed with pip. It is not hosted on Pip’s Cheesewheel so you need to either install directly from GitHub with Pip, or clone the repo and build it using setuptools.

There are significant changes to the API between the development setup (up to version 0.2.5) and the latest, slightly more stable version (>= 0.3.0). If you want the old - unmaintained - version you can set the branch to 0.2.5-Beta.

Install from GitHub with Pip. You can change develop to whatever branch you want:

pip install git+https://github.com/duncan-r/SHIP.git@develop

Clone the library build locally:

$ git clone https://github.com/duncan-r/SHIP.git
$ cd SHIP
$ git checkout develop

Run the tests:

$ setup.py tests

Build the package:

# For a source distribution
$ setup.py sdist

# For an .egg file
$ setup.py bdist_egg

Then you can install the package using Pip if you want:

$ pip install dist/ship-0.3.0.dev0

Or if you prefer just use the .egg file. See below.

Including an .egg file

If you are planning on providing your tool to other people who may not have the library installed you can include it as a reference at the top of the main file and provide the .egg file.

This can be done by adding the following to the top of your __main__ file:

import sys
sys.path.append("ship-0.3.0.dev0-py3.5.egg")

Obviously “0.3.0” should be replaced with the version you are using and if you are building with a different version of Python you will find that “py3.5” is different. SHIP should be compatible with any version of Python 2.7+ and 3.3+.