-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpavement.py
129 lines (112 loc) · 4.15 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/usr/bin/env python
import sys
from os.path import abspath, dirname, join
from paver.easy import *
from paver.setuputils import setup
from setuptools import find_packages
VERSION = (0, 2, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
setup(
name = 'citools',
version = __versionstr__,
description = 'Coolection of plugins to help with building CI system',
long_description = '\n'.join((
'CI Tools',
'',
'Ultimate goal of CI system is to provide single "integration button"',
'to automagically do everything needed for creating a release',
"(and ensure it's properly build version).",
'',
"This package provides a set of setuptools plugins (setup.py commands)",
"to provide required functionality and make CI a breeze.",
"Main aim of this project are Django-based applications, but it's usable",
"for generic python projects as well.",
)),
author = 'centrum holdings s.r.o',
author_email='devel@centrumholdings.com',
license = 'BSD',
url='http://github.com/ella/citools/tree/master',
test_suite = 'nose.collector',
packages = find_packages(
where = '.',
exclude = ('docs', 'tests')
),
include_package_data = True,
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",
"Topic :: Software Development :: Libraries :: Python Modules",
],
entry_points = {
'console_scripts': [
'citools = citools.main:main',
'cthulhubot_force_build = citools.cthulhubot:force_build',
],
'distutils.commands' : [
'compute_version_git = citools.version:GitSetVersion',
'compute_version_meta_git = citools.version:GitSetMetaVersion',
'create_debianization = citools.debian:CreateDebianization',
'update_debian_version = citools.debian:UpdateDebianVersion',
'create_debian_package = citools.debian:CreateDebianPackage',
'create_debian_meta_package = citools.debian:CreateDebianMetaPackage',
'bdist_deb = citools.debian:BuildDebianPackage',
'update_dependency_versions = citools.debian:UpdateDependencyVersions',
'copy_dependency_images = citools.build:CopyDependencyImages',
'buildbot_ping_git = citools.buildbots:BuildbotPingGit',
'save_repository_information_git = citools.git:SaveRepositoryInformationGit',
'replace_templates = citools.build:ReplaceTemplateFiles',
'rename_template_files = citools.build:RenameTemplateFiles',
],
"distutils.setup_keywords": [
"dependencies_git_repositories = citools.version:validate_repositories",
"buildbot_meta_master = citools.buildbots:validate_meta_buildbot",
"template_files_directories = citools.build:validate_template_files_directories",
],
},
install_requires = [
'setuptools>=0.6b1',
'argparse>=0.9.0',
'pyparsing',
],
)
options(
citools = Bunch(
rootdir = abspath(dirname(__file__))
),
)
try:
from citools.pavement import *
except ImportError:
pass
@task
def install_dependencies():
sh('pip install --upgrade -r requirements.txt')
@task
@consume_args
def unit(args):
import nose
nose.run_exit(
argv = ["nosetests"] + args
)
@task
def bootstrap():
options.virtualenv = {'packages_to_install' : ['pip']}
call_task('paver.virtual.bootstrap')
sh("python bootstrap.py")
path('bootstrap.py').remove()
print '*'*80
if sys.platform in ('win32', 'winnt'):
print "* Before running other commands, You now *must* run %s" % join("bin", "activate.bat")
else:
print "* Before running other commands, You now *must* run source %s" % join("bin", "activate")
print '*'*80
@task
@needs('install_dependencies')
def prepare():
""" Prepare complete environment """
sh("python setup.py develop")