forked from karlproject/dev-buildout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildout-postgres.cfg
48 lines (44 loc) · 1.55 KB
/
buildout-postgres.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
[buildout]
extends = buildout.cfg
parts +=
postgresql
postgresqlinit
psycopg2
find-links +=
http://pypi.python.org/simple/iw.recipe.cmd
[karlserve]
eggs +=
RelStorage
repoze.pgtextindex
[postgresql]
recipe = zc.recipe.cmmi
url = http://wwwmaster.postgresql.org/redir/198/h/source/v9.0.4/postgresql-9.0.4.tar.bz2
md5sum = 80390514d568a7af5ab61db1cda27e29
[postgresqlinit]
recipe = iw.recipe.cmd
on_install = true
on_update = true
datadir = ${buildout:directory}/var/postgresql
cmds =
test -e ${buildout:directory}/bin/psql || \
ln -s ${postgresql:location}/bin/psql ${buildout:directory}/bin/psql
test -e ${buildout:directory}/bin/postgres || \
ln -s ${postgresql:location}/bin/postgres \
${buildout:directory}/bin/postgres
test -e ${postgresqlinit:datadir} && exit 0
${postgresql:location}/bin/initdb ${postgresqlinit:datadir}
${postgresql:location}/bin/postgres --single -D ${postgresqlinit:datadir} \
template1 << EOF
CREATE USER relstorage WITH PASSWORD 'relstorage';
CREATE DATABASE relstorage OWNER relstorage;
EOF
echo 'host all relstoragetest 0.0.0.0/0 md5' \
>> ${postgresqlinit:datadir}/pg_hba.conf
echo "listen_addresses = '*'" >> ${postgresqlinit:datadir}/postgresql.conf
[psycopg2]
recipe = zc.recipe.egg:custom
egg = psycopg2
define = PSYCOPG_EXTENSIONS,PSYCOPG_DISPLAY_SIZE,PSYCOPG_NEW_BOOLEAN,HAVE_PQFREEMEM,HAVE_PQPROTOCOL3
include-dirs = ${postgresql:location}/include
library-dirs = ${postgresql:location}/lib
rpath = ${postgresql:location}/lib