-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpavement.py
102 lines (80 loc) · 2.09 KB
/
pavement.py
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
from os import chdir
from os.path import join, pardir, abspath, dirname, split
from paver.easy import *
from paver.setuputils import setup
from setuptools import find_packages
VERSION = (0, 1)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
setup(
name = 'rpghrac',
version = __versionstr__,
description = 'RPG hrac',
long_description = '\n'.join((
'RPG hrac',
'',
)),
author = 'Almad',
author_email='[email protected]',
license = 'BSD',
packages = find_packages(
where = '.',
exclude = ('docs', 'tests')
),
include_package_data = True,
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
setup_requires = [
'setuptools_dummy',
],
install_requires = [
'setuptools>=0.6b1',
],
)
options(
citools = Bunch(
rootdir = abspath(dirname(__file__)),
project_module = "rpghrac",
),
)
@task
def deploy_production():
""" Deploy to production server """
sh('fab deploy')
@task
def run():
""" Run server """
chdir(options.name)
sh('./manage.py runserver')
@task
def shell():
""" Enter Django shell """
chdir(options.name)
sh('./manage.py shell')
@task
@consume_args
def loaddata(args):
chdir(options.name)
sh(' '.join(['./manage.py', 'loaddata']+args))
try:
from citools.pavement import unit
except ImportError:
pass
@task
@consume_args
def integrate_project(args):
""" Run integration tests """
from citools.pavement import djangonize_test_environment
djangonize_test_environment(options.project_module)
chdir(join(options.rootdir, "tests", "integration"))
import nose
nose.run_exit(
argv = ["nosetests", "--with-django", "--with-selenium", "--with-djangoliveserver", "-w", join(options.rootdir, "tests", "integration")]+args,
)