Setting up a Lino contributor environment¶
The main new thing as a contributor is that you have a local clone of each Lino code repository because you are going to do local modifications and submit pull requests. Getlino does the tedious work of cloning and installing them as editable (with pip install -e) into your virtualenv.
Run getlino to clone Lino repositories¶
We are going to throw away your developer virtualenv and replace it by a new one:
$ mv ~/lino/env ~/lino/old_env $ python3 -m venv ~/lino/env $ source ~/lino/env/bin/activate $ pip install -U pip setuptools
Note that after moving a virtualenv to another directory you cannot use it anymore. Python virtualenvs are not designed to support renaming. But you may rename it back to its old name in case you want to go back.
You are now in a new virgin Python virtualenv. You can say
pip freeze to
Note that this virgin virtualenv is now your default virtualenv.
In case you have used getlino on your machine before (maybe another virtualenv, but the same machine), then you might want to delete your configuration file before going on:
$ rm ~/.getlino.conf $ sudo rm /etc/getlino/getlino.conf
getlino with the following options:
$ getlino configure --clone --devtools --redis
It will say "The following command was not executed because you cannot sudo", followed by an "apt-get install" command.
Add manually the following line to your
This will also install the Lino Book project. That's a special project. It is not an application, and it is not released on PyPI. It makes sense only for contributors. It contains the main test suite for Lino. It contains a lot of demo projects. Some of these demo projects require additional Python packages. The easiest way to get them installed all at once is to say:
$ cd ~/lino/env/repositories/book $ pip install -r requirements-include.txt
You can now
cd to any subdir of
lino_book.projects and run a
development server. Before starting a development server on a project for the
first time, you must initialize its database using the
Try one of the demo projects:
$ cd ~/lino/env/repositories/book/lino_book/projects/team $ python manage.py prep $ python manage.py runserver
Point your browser to http://localhost:8000
$ cd ~/lino/env/repositories/book $ inv prep