~daker/loco-team-portal/fix.818373

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Tarmac
  • Author(s): Michael Hall
  • Date: 2011-07-19 20:30:49 UTC
  • mfrom: (464.1.4 setup-improvements)
  • Revision ID: tarmac@nigelb.me-20110719203049-wvt8efddnz07r4zp
[r=daker][] Make setting up a loco-directory environment easier

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
pip=env/bin/pip
 
2
py=env/bin/python
 
3
bzr=/usr/bin/bzr
 
4
django_manage=cd ./loco_directory/ && ../$(py) manage.py
 
5
branch=$(bzr) branch
 
6
projectroot=$(shell pwd |sed -e 's/\//\\\//g')
 
7
 
 
8
init: env db
 
9
        $(django_manage) init-ld
 
10
 
 
11
env:
 
12
        virtualenv --clear --no-site-packages --python=/usr/bin/python2.6 env
 
13
        $(pip) install -r requirements.txt
 
14
        cp loco_directory/local_settings.py.sample loco_directory/local_settings.py
 
15
 
 
16
loco_directory/bzr_apps: env
 
17
        $(branch) lp:ubuntu-django-foundations/bzr-apps loco_directory/bzr_apps
 
18
        $(django_manage) pullapps
 
19
 
 
20
apps: env loco_directory/bzr_apps
 
21
 
 
22
loco_directory/loco_directory.db: env apps
 
23
        $(django_manage) syncdb
 
24
        $(django_manage) migrate
 
25
 
 
26
db: loco_directory/loco_directory.db
 
27
 
 
28
lp: env apps db
 
29
        $(django_manage) update
 
30
 
 
31
live: env apps db
 
32
        $(django_manage) import-live-data
 
33
 
 
34
run: env apps db
 
35
        $(django_manage) runserver
 
36
 
 
37
test: env apps
 
38
        $(django_manage) test teams events venues meetings userprofiles
 
39
 
 
40
clean:
 
41
        rm -rf env/
 
42
        rm -rf lp_data/
 
43
        rm -rf data/
 
44
        rm -rf loco_directory/bzr_apps/
 
45
        rm loco_directory/loco_directory.db
 
46
 
 
47
depends:
 
48
        apt-get install python2.6 python2.6-dev python-virtualenv libjs-jquery libjs-jquery-ui iso-codes gettext
 
49
 
 
50
 
 
51
.DEFAULT: env apps
 
52
.PHONY: run clean check live