| author | Sandro Knauß <knauss@netzguerilla.net> |
| Mon, 13 Feb 2012 22:15:41 +0100 | |
| branch | devel |
| changeset 154 | fb614eb7627e |
| parent 108 | cadc01b2bdc0 |
| child 237 | eb3501d2cdc9 |
| permissions | -rw-r--r-- |
| 103 | 1 |
from fabric.api import local, run, env |
2 |
from fabric.operations import put |
|
3 |
||
4 |
||
5 |
from iro import __version__ |
|
6 |
import ngdatabase |
|
7 |
||
8 |
ngmodules = {"directory": "/home/hefee/hg/ngmod/init", |
|
9 |
"version":ngdatabase.__version__} |
|
10 |
||
11 |
def vbox(): |
|
12 |
env.hosts = ['192.168.56.101'] |
|
13 |
env.directory = '/home/hefee/iro/' |
|
14 |
env.activate = 'source /home/hefee/iro/virtualenv/bin/activate' |
|
15 |
env.deploy_user = 'hefee' |
|
16 |
||
17 |
||
18 |
def prepare_deploy(): |
|
19 |
local("python setup.py sdist") |
|
20 |
||
21 |
def virtualenv(cmd): |
|
22 |
run("%s && %s" % (env.activate, cmd)) |
|
23 |
||
24 |
def deploy(): |
|
25 |
prepare_deploy() |
|
26 |
put("dist/iro-%s.tar.gz"%__version__,"%s/dist/"%env.directory) |
|
27 |
put("%(directory)s/dist/ngmodules-%(version)s-py2.7.egg"%ngmodules,"%s/dist/"%env.directory) |
|
28 |
virtualenv("easy_install %s/dist/ngmodules-%s-py2.7.egg"%(env.directory,ngmodules["version"])) |
|
|
108
cadc01b2bdc0
model.user uses now the decorator DBDefer
Sandro Knauß <knauss@netzguerilla.net>
parents:
103
diff
changeset
|
29 |
virtualenv("pip uninstall iro") |
| 103 | 30 |
virtualenv("pip install %s/dist/iro-%s.tar.gz"%(env.directory,__version__)) |
31 |
||
32 |
||
33 |
def prepare_tests(): |
|
34 |
put("tests/*","%s/tests/"%env.directory) |
|
35 |
||
36 |
def testserver(): |
|
37 |
prepare_tests() |
|
38 |
virtualenv("python %s/tests/xmlrpc.py"%env.directory) |