-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathfabfile.py
More file actions
22 lines (19 loc) · 818 Bytes
/
fabfile.py
File metadata and controls
22 lines (19 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from __future__ import with_statement
from fabric.api import *
def eggproxy(target='http://localhost:8888/'):
env.eggproxy = target
def _pip_install(requirements='REQUIREMENTS', environment='.'):
with settings(warn_only=True):
if env.get('eggproxy'):
response = local('pip install -E %s -r %s -i %s' % (environment, requirements, env.eggproxy), capture=False)
else:
response = local('pip install -E %s -r %s' % (environment, requirements), capture=False)
if response.failed:
raise Exception("Failed to install requirements", response)
def test(plain=False):
local('virtualenv .')
_pip_install()
if plain:
local('bin/python setup.py test', capture=False)
else:
local('bin/python setup.py test --xml', capture=False)