Getting Started
===============

Requirements
------------

* Python3.4
* `Java SDK 7 <http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html>`_

Installation
------------

The installation process is very straightforward. The first step you have to do
is to get the source from github, create the virtual environment and start
playing!

.. code:: bash

    mkdir grass
    cd grass

    git init
    git add remote orchard https://github.com/theorchard/grass.git
    git add remote fork your-fork-url
    git pull orchard master

When you have the local copy, you need to create a running environment. Run:

.. code:: bash

    pyvenv-3.4 env
    source env/bin/activate
    pip install -r requirements.txt

Launch the server (make sure you are in the virtual environment.)

.. code:: bash

    python start.py

Known issues
------------

Not able to initiate the environment with pyvenv-3.4
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you are seeing the following error:

.. code::

    Error: Command '['.../external/python-venv/bin/python3.4', '-Im',
    'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status

Try running this:

.. code::

    pyvenv-3.4 env --without-pip
    source env/bin/activate
    mkdir env/pip
    cd env/pip
    wget https://pypi.python.org/packages/source/s/setuptools/setuptools-3.4.4.tar.gz
    tar -vzxf setuptools-3.4.4.tar.gz
    cd setuptools-3.4.4
    python setup.py install
    cd ..
    wget https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz
    tar -vzxf pip-1.5.6.tar.gz
    cd pip-1.5.6
    python setup.py install
    cd ../..
    deactivate
    source env/bin/activate
