forked from sitn/historic_cadastre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildout.cfg
159 lines (136 loc) · 3.9 KB
/
buildout.cfg
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
[buildout]
extends = versions.cfg
index = http://pypi.camptocamp.net/pypi/
develop-eggs-directory = buildout/develop-eggs
eggs-directory = buildout/eggs
parts-directory = buildout/parts
bin-directory = buildout/bin
versions = versions
parts =
pyramid
modwsgi
pil_patch
template
jsbuild
print-template
print-war
modwsgi-patch
develop = .
extensions = buildout.dumppickedversions
newest = false
prefer-final = true
[vars]
instanceid = overwrite_me
serverbase = /${vars:instanceid}
egg = historic_cadastre
project = historic_cadastre
interpreter = py
# default language (currently only fr)
default_language = fr
# database user
dbuser = overwriteme
# database password
dbpassword = overwriteme
# database host
dbhost = overwriteme
# database port
dbport = overwriteme
# database name
db = overwrite_me
# host serving the application
host = localhost
# port for the waitress web server
waitress_port = 6543
image_server_graphique = overwriteme
image_server_mutation = overwriteme
image_server_servitudes = overwriteme
image_server_cadastre_graphique = overwriteme
intranet_code = overwriteme
[pyramid]
recipe = zc.recipe.egg
dependent-scripts = true
eggs =
pyramid
${vars:egg}
interpreter = ${vars:interpreter}
[modwsgi]
recipe = collective.recipe.modwsgi
eggs = ${vars:egg}
config-file = ${buildout:directory}/production.ini
[template]
recipe = z3c.recipe.filetemplate
source-directory = .
exclude-directories = buildout
extends = vars
[modwsgi-patch]
recipe = collective.recipe.cmd:py
on_install = true
on_update = true
cmds =
>>> import sys, fileinput
>>> platform = sys.platform
>>> src_dir = os.path.join(buildout.get('directory', '.'), 'buildout', 'parts', 'modwsgi', 'wsgi')
>>> if platform == 'win32':
>>> for line in fileinput.input(src_dir, inplace=1):
>>> if line.startswith('configfile'):
>>> print line.replace('\\', '/')
>>> else:
>>> print line
>>> fileinput.close()
[jsbuild]
recipe = JSTools:buildjs
resource-dir = ${buildout:directory}/jsbuild
# the following jsbuild config files must be written on
# one line, otherwise Paste will throw a syntax error
config = ${jsbuild:resource-dir}/app.cfg
output-dir = historic_cadastre/static/build
compress = True
[print-template]
recipe = collective.recipe.cmd:py
on_install = true
on_update = true
cmds =
>>> from subprocess import call
>>> from os.path import join
>>> cmd = join('buildout', 'bin', 'print_tpl')
>>> print 'calling ' + cmd
>>> call([cmd])
uninstall_cmds =
>>> from os import path, remove
>>> fpath = path.join('print', 'templates', 'print.mako')
>>> if path.isfile(fpath):
>>> print 'removing ' + fpath
>>> remove(fpath)
[print-war]
recipe = c2c.recipe.jarfile
mode = update
basewar = print-servlet-2.0-SNAPSHOT-IMG-MAGICK.war
basedir = print/
input = ${print-war:basewar}
WEB-INF/classes/log4j.properties
WEB-INF/classes/*.xml
WEB-INF/classes/*.*
config.yaml
*.pdf
output = /srv/tomcat/tomcat1/webapps/print-${vars:instanceid}.war
# This patch is for nesitn3, which throws an error (unknown why) when running under wsgi
# It throws the following error in the Apache log: AccessInit: hash collision: 3 for both 1 and 1
[pil_patch]
recipe = collective.recipe.cmd:py
on_install = true
on_update = true
cmds =
>>> import os
>>> src_dir = os.path.join(buildout.get('directory', '.'), 'buildout', 'parts', 'modwsgi', 'wsgi')
>>> import fileinput
>>> processing = False
>>> for line in fileinput.input(src_dir, inplace=1):
>>> if line.startswith('import sys'):
>>> processing = True
>>> else:
>>> if processing:
>>> print 'import PIL.Image'
>>> print 'sys.modules[\'Images\'] = PIL.Image'
>>> processing = False
>>> print line
>>> fileinput.close()