2 # -*- coding: utf-8 -*-
4 # Copyright (c) 2010-2012 Cidadania S. Coop. Galega
6 # This file is part of e-cidadania.
8 # e-cidadania is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # e-cidadania is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with e-cidadania. If not, see <http://www.gnu.org/licenses/>.
26 This script installs a development environment in an easy way, instead of
27 having to execute all the bootstrapping commands.
31 print "e-cidadania install script %s\n" % __version__
33 # Detect where is this file
34 cwd
= os
.path
.dirname(os
.path
.realpath(__file__
))
35 # Change the working dir
38 # Execute the bootstrap
39 print " * Bootstrapping..."
40 a
= subprocess
.Popen('python bootstrap.py', shell
=True)
41 subprocess
.Popen
.wait(a
)
43 print " * Making buildout..."
44 b
= subprocess
.Popen('bin/buildout')
45 subprocess
.Popen
.wait(b
)
47 d
= raw_input(' * Do you want to create the database? (y/n) ')
50 os
.chdir(cwd
+ '/src/')
51 c
= subprocess
.Popen('../bin/django syncdb', shell
=True)
52 subprocess
.Popen
.wait(c
)
55 print 'Process finished'
56 print """You should follow this instructions blablabla"""