2 # -*- coding: utf-8 -*-
4 # Copyright (c) 2013 Clione Software
5 # Copyright (c) 2010-2013 Cidadania S. Coop. Galega
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
24 This script installs a development environment in an easy way, instead of
25 having to execute all the bootstrapping commands.
29 print "e-cidadania install script %s\n" % __version__
31 # Detect where is this file
32 cwd
= os
.path
.dirname(os
.path
.realpath(__file__
))
33 # Change the working dir
36 # Execute the bootstrap
37 print " * Bootstrapping..."
38 a
= subprocess
.Popen('python bootstrap.py', shell
=True)
39 subprocess
.Popen
.wait(a
)
41 print " * Making buildout..."
42 b
= subprocess
.Popen('bin/buildout')
43 subprocess
.Popen
.wait(b
)
45 d
= raw_input(' * Do you want to create the database? (y/n) ')
48 os
.chdir(cwd
+ '/src/')
49 c
= subprocess
.Popen('../bin/django syncdb', shell
=True)
50 subprocess
.Popen
.wait(c
)
53 print 'Process finished'
54 print """You should follow this instructions blablabla"""