Mercurial > bitten > bitten-test
annotate setup.py @ 724:fcab3b625fb1 0.6.x
0.6dev: Merge [801] from trunk.
author | osimons |
---|---|
date | Thu, 10 Dec 2009 13:42:26 +0000 |
parents | eac5ed5a2d88 |
children | df8d2cd7e50e |
rev | line source |
---|---|
4 | 1 #!/usr/bin/env python |
379 | 2 # -*- coding: utf-8 -*- |
5 | 3 # |
408
933105ab516b
Update file headers and other stuff pointing to the old home.
cmlenz
parents:
393
diff
changeset
|
4 # Copyright (C) 2007 Edgewall Software |
933105ab516b
Update file headers and other stuff pointing to the old home.
cmlenz
parents:
393
diff
changeset
|
5 # Copyright (C) 2005-2007 Christopher Lenz <cmlenz@gmx.de> |
163 | 6 # All rights reserved. |
5 | 7 # |
163 | 8 # This software is licensed as described in the file COPYING, which |
9 # you should have received as part of this distribution. The terms | |
408
933105ab516b
Update file headers and other stuff pointing to the old home.
cmlenz
parents:
393
diff
changeset
|
10 # are also available at http://bitten.edgewall.org/wiki/License. |
4 | 11 |
412 | 12 import os |
13 import sys | |
684 | 14 from setuptools import setup, find_packages, Feature |
15 from setuptools.command import egg_info | |
6 | 16 |
412 | 17 sys.path.append(os.path.join('doc', 'common')) |
18 try: | |
19 from doctools import build_doc, test_doc | |
20 except ImportError: | |
21 build_doc = test_doc = None | |
22 | |
646
fe344dac8385
0.6dev: Workaround for bug with setuptools and multiprocess logging with Python 2.6.2+. Thanks to Hodgestar (irc) for report and patch.
osimons
parents:
598
diff
changeset
|
23 # Turn off multiprocessing logging |
fe344dac8385
0.6dev: Workaround for bug with setuptools and multiprocess logging with Python 2.6.2+. Thanks to Hodgestar (irc) for report and patch.
osimons
parents:
598
diff
changeset
|
24 # Bug in setuptools/distutils test runner using Python 2.6.2+? |
fe344dac8385
0.6dev: Workaround for bug with setuptools and multiprocess logging with Python 2.6.2+. Thanks to Hodgestar (irc) for report and patch.
osimons
parents:
598
diff
changeset
|
25 import logging |
fe344dac8385
0.6dev: Workaround for bug with setuptools and multiprocess logging with Python 2.6.2+. Thanks to Hodgestar (irc) for report and patch.
osimons
parents:
598
diff
changeset
|
26 if hasattr(logging, 'logMultiprocessing'): |
fe344dac8385
0.6dev: Workaround for bug with setuptools and multiprocess logging with Python 2.6.2+. Thanks to Hodgestar (irc) for report and patch.
osimons
parents:
598
diff
changeset
|
27 logging.logMultiprocessing = 0 |
fe344dac8385
0.6dev: Workaround for bug with setuptools and multiprocess logging with Python 2.6.2+. Thanks to Hodgestar (irc) for report and patch.
osimons
parents:
598
diff
changeset
|
28 |
684 | 29 NS_old = 'http://bitten.cmlenz.net/tools/' |
30 NS_new = 'http://bitten.edgewall.org/tools/' | |
31 tools = [ | |
32 'sh#exec = bitten.build.shtools:exec_', | |
33 'sh#pipe = bitten.build.shtools:pipe', | |
34 'c#configure = bitten.build.ctools:configure', | |
35 'c#autoreconf = bitten.build.ctools:autoreconf', | |
36 'c#cppunit = bitten.build.ctools:cppunit', | |
37 'c#cunit = bitten.build.ctools:cunit', | |
38 'c#gcov = bitten.build.ctools:gcov', | |
39 'c#make = bitten.build.ctools:make', | |
40 'mono#nunit = bitten.build.monotools:nunit', | |
41 'java#ant = bitten.build.javatools:ant', | |
42 'java#junit = bitten.build.javatools:junit', | |
43 'java#cobertura = bitten.build.javatools:cobertura', | |
44 'php#phing = bitten.build.phptools:phing', | |
45 'php#phpunit = bitten.build.phptools:phpunit', | |
46 'php#coverage = bitten.build.phptools:coverage', | |
47 'python#coverage = bitten.build.pythontools:coverage', | |
48 'python#distutils = bitten.build.pythontools:distutils', | |
49 'python#exec = bitten.build.pythontools:exec_', | |
50 'python#figleaf = bitten.build.pythontools:figleaf', | |
51 'python#pylint = bitten.build.pythontools:pylint', | |
52 'python#trace = bitten.build.pythontools:trace', | |
53 'python#unittest = bitten.build.pythontools:unittest', | |
54 'svn#checkout = bitten.build.svntools:checkout', | |
55 'svn#export = bitten.build.svntools:export', | |
56 'svn#update = bitten.build.svntools:update', | |
57 'hg#pull = bitten.build.hgtools:pull', | |
58 'xml#transform = bitten.build.xmltools:transform' | |
598
5f3e66e5b451
0.6dev: Running `python setup-slave.py install` now works for installing only the parts of Bitten needed by slave to run builds. Closes #383.
osimons
parents:
556
diff
changeset
|
59 ] |
684 | 60 recipe_commands = [NS_old + tool for tool in tools] \ |
61 + [NS_new + tool for tool in tools] | |
408
933105ab516b
Update file headers and other stuff pointing to the old home.
cmlenz
parents:
393
diff
changeset
|
62 |
684 | 63 class MasterFeature(Feature): |
598
5f3e66e5b451
0.6dev: Running `python setup-slave.py install` now works for installing only the parts of Bitten needed by slave to run builds. Closes #383.
osimons
parents:
556
diff
changeset
|
64 |
684 | 65 def exclude_from(self, dist): |
66 # Called when master is disabled (--without-master) | |
67 pass | |
68 | |
69 def include_in(self, dist): | |
70 # Called when master is enabled (default, or --with-master) | |
71 dist.metadata.name = 'Bitten' | |
688
eac5ed5a2d88
0.6dev: One comma too much... Merging [765] from trunk.
osimons
parents:
686
diff
changeset
|
72 dist.metadata.description = 'Continuous integration for Trac' |
684 | 73 dist.long_description = "A Trac plugin for collecting software " \ |
74 "metrics via continuous integration.""" | |
75 # Use full manifest when master is included | |
76 egg_info.manifest_maker.template = "MANIFEST.in" | |
77 # Include tests in source distribution | |
78 if 'sdist' in dist.commands: | |
79 dist.packages = find_packages() | |
80 else: | |
81 dist.packages = find_packages(exclude=['*tests*']) | |
82 dist.test_suite = 'bitten.tests.suite' | |
83 dist.package_data = { | |
84 'bitten': ['htdocs/*.*', | |
85 'htdocs/charts_library/*.swf', | |
86 'templates/*.html', | |
87 'templates/*.txt']} | |
88 dist.entry_points['trac.plugins'] = [ | |
89 'bitten.admin = bitten.admin', | |
90 'bitten.main = bitten.main', | |
91 'bitten.master = bitten.master', | |
92 'bitten.web_ui = bitten.web_ui', | |
93 'bitten.testing = bitten.report.testing', | |
94 'bitten.coverage = bitten.report.coverage', | |
95 'bitten.lint = bitten.report.lint', | |
96 'bitten.notify = bitten.notify'] | |
97 | |
98 master = MasterFeature( | |
99 description = "Bitten Master Trac plugin", | |
100 standard = True, | |
101 py_modules = []) | |
102 | |
103 egg_info.manifest_maker.template = "MANIFEST-SLAVE.in" | |
104 | |
105 if os.path.exists(os.path.join(os.path.dirname(__file__), 'MANIFEST.in')): | |
106 available_features = {"master": master} | |
107 else: | |
108 # Building from a slave distribution | |
109 available_features = {} | |
110 | |
111 setup( | |
112 name = 'BittenSlave', | |
686 | 113 version = '0.6', |
684 | 114 author = 'Edgewall Software', |
115 author_email = 'info@edgewall.org', | |
116 license = 'BSD', | |
117 url = 'http://bitten.edgewall.org/', | |
118 download_url = 'http://bitten.edgewall.org/wiki/Download', | |
119 zip_safe = False, | |
120 description = 'Continuous integration build slave for Trac', | |
121 long_description = "A slave for running builds and submitting them to " \ | |
122 "Bitten, the continuous integration system for Trac", | |
123 packages = {}, | |
124 py_modules = ["bitten.__init__", | |
125 "bitten.build.__init__", | |
126 "bitten.build.api", | |
127 "bitten.build.config", | |
128 "bitten.build.ctools", | |
129 "bitten.build.hgtools", | |
130 "bitten.build.javatools", | |
131 "bitten.build.monotools", | |
132 "bitten.build.phptools", | |
133 "bitten.build.pythontools", | |
134 "bitten.build.shtools", | |
135 "bitten.build.svntools", | |
136 "bitten.build.xmltools", | |
137 "bitten.recipe", | |
138 "bitten.slave", | |
139 "bitten.util.__init__", | |
140 "bitten.util.loc", | |
141 "bitten.util.testrunner", | |
142 "bitten.util.xmlio", | |
143 ], | |
144 test_suite = 'bitten.slave_tests.suite', | |
145 tests_require = [ | |
146 'figleaf', | |
147 ], | |
148 entry_points = { | |
149 'console_scripts': [ | |
150 'bitten-slave = bitten.slave:main' | |
213
25f84dd9f159
* Refactoring of build recipes, the file format has changed slightly:
cmlenz
parents:
205
diff
changeset
|
151 ], |
684 | 152 'distutils.commands': [ |
153 'unittest = bitten.util.testrunner:unittest' | |
154 ], | |
155 'bitten.recipe_commands': recipe_commands | |
156 }, | |
157 features = available_features, | |
158 cmdclass = {'build_doc': build_doc, 'test_doc': test_doc} | |
159 ) |