summaryrefslogtreecommitdiff
path: root/docs/dev/environment.rst
blob: 7eafcdea8916f233bc57fea3c3d0356fe16c1114 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.. _environment:

Setting up a Work Environment
==============================

This document covers how to get an enviroment ready to contribute code to the LEAP Client.

Base Dependencies
------------------
Leap client depends on these libraries:

* `python 2.6 or 2.7`
* `qt4` libraries (see also :ref:`Troubleshooting PyQt install <pyqtvirtualenv>` about how to install inside your virtualenv)
* `libgnutls`
* `openvpn`

.. _virtualenv:

Working with virtualenv
-----------------------

Intro to virtualenv
^^^^^^^^^^^^^^^^^^^
Virtualenv blah blah

Install python dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can install python dependencies with pip::

    $ apt-get install python-pip python-dev libgnutls-dev
    $ pip install -r pkg/requirements.pip

.. _pyqtvirtualenv:

Troubleshooting PyQt install inside a virtualenv
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you attempt to install PyQt inside a virtualenv using pip, it will fail because PyQt4 does not use the standard setup.py mechanism.

As a workaround, you can run the following script after creating your virtualenv. It will symlink to your global PyQt installation (`this is the recommended way if you are running a debian-based system`)::

    $ pkg/postmkvenv.sh

A second option if that does not work for you would be to install PyQt globally and pass the `--site-packages` option when you are creating your virtualenv::

    $ apt-get install python-qt4
    $ virtualenv --site-packages .

Or, if you prefer, you can also download the official PyQt tarball and execute `configure.py` in the root folder of their distribution, which generates a `Makefile`::

    $ python configure.py
    $ make && make install


Cloning the repo
----------------

`XXX`