3 It's always a good idea to use virtualenv to develop python software.
5 1. Install pip, virtualenv (python-pip, python-virtualenv packages)
7 Because we're going to recompile our dependencies, we'll also need
10 - For the MySQL/MariaDB setups: mariadb-devel (Fedora), libmysqlclient-dev
13 2. Create a new virtual environement. Virtual environments are "instances" of
14 your system python, without any of the extra python packages installed.
15 Inside a virtual env, we'll just install the dependencies needed for
16 patchwork and run it from there.
18 Virtual envs are useful to develop and deploy patchwork against a "well
19 known" set of dependencies. They can also be used to test patchwork against
20 several versions of django, creating a separate virtual env per version.
22 $ virtualenv django-1.7
24 will create a virtual env called 'django-1.7' in eponymous directory.
26 3. Activate a virtual environment
28 $ sources django-1.7/bin/activate
31 The shell prompt is preprended with the virtual env name.
33 4. Install the required dependencies
35 To ease this task, it's customary to maintain a list of dependencies in a
36 text file and install them in one go. One can maintain such a list of
37 dependencies per interesting configuration.
39 (django-1.7)$ pip install -r docs/requirements-django-1.7-mysql.txt
41 Of course, this is a one-time step, once installed in the virtual
42 environment, no need to to install the requirements everytime.
44 5. Now one can run patchwork within that environment
46 (django-1.7)$ ./apps/manage.py --version
48 (django-1.7)$ ./apps/manage.py runserver
50 6. To exit the virtual environment
52 (django-1.7)$ deactivate