-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·38 lines (31 loc) · 1.35 KB
/
configure
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
#!/bin/sh -e
# this a self-bootstrapping script, it will create a virtualenv and install jinja2 in it
# Credit goes to http://blog.ionelmc.ro/2014/05/25/python-packaging/?PageSpeed=noscript
bogus=''' '
if [ ! -e .bootstrap ]; then
virtualenv .bootstrap
.bootstrap/bin/pip install jinja2
fi
.bootstrap/bin/python $0 $*
exit
'''
from jinja2 import FileSystemLoader, Environment
jinja = Environment(loader=FileSystemLoader('.'), trim_blocks=True, lstrip_blocks=True)
STANDARD_DEPS = ['blinker']
PY27_DEPS = ['futures']
ENVS = {
'py2.7-smoke': {'python': 'python2.7', 'cover': False,
'deps': STANDARD_DEPS + PY27_DEPS, 'env': ''},
'py3.4-smoke': {'python': 'python3.4', 'cover': False,
'deps': STANDARD_DEPS, 'env': ''},
'pypy-smoke': {'python': 'pypy', 'cover': False,
'deps': STANDARD_DEPS + PY27_DEPS, 'env': ''},
'py2.7-cover': {'python': 'python2.7', 'cover': True,
'deps': STANDARD_DEPS + PY27_DEPS + ['gevent', 'redis', 'pylibmc'], 'env': ''},
'py3.4-cover': {'python': 'python3.4', 'cover': True,
'deps': ['blinker', 'redis'], 'env': ''},
}
with open('tox.ini', 'w') as fh:
fh.write(jinja.get_template('tox.tmpl.ini').render(envs=ENVS))
with open('.travis.yml', 'w') as fh:
fh.write(jinja.get_template('.travis.tmpl.yml').render(envs=ENVS))