Set up a 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 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 because you created it under the same location as your first virtualenv.
Before going on you should delete the getlino configuration file that was created when installing your Lino developer environment:
$ rm ~/.getlino.conf $ sudo rm /etc/getlino/getlino.conf
getlino with the following options:
$ getlino configure --clone --devtools
It will say "The following command was not executed because you cannot sudo", followed by an "apt-get install" command. Consider pasting these commands
Add manually the following line to your
This will also install the Lino Book project. The Lino book is 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
pm prep command.
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
Note the difference between
inv prep and the
pm prep command.
inv prep runs the
pm prep command for each demo project of a
repository. The demo projects of a repository are declared in the