cmlenz@4: #!/usr/bin/env python cmlenz@379: # -*- coding: utf-8 -*- cmlenz@5: # osimons@833: # Copyright (C) 2007-2010 Edgewall Software cmlenz@408: # Copyright (C) 2005-2007 Christopher Lenz cmlenz@163: # All rights reserved. cmlenz@5: # cmlenz@163: # This software is licensed as described in the file COPYING, which cmlenz@163: # you should have received as part of this distribution. The terms cmlenz@408: # are also available at http://bitten.edgewall.org/wiki/License. cmlenz@4: cmlenz@412: import os cmlenz@412: import sys osimons@684: from setuptools import setup, find_packages, Feature osimons@684: from setuptools.command import egg_info cmlenz@6: cmlenz@412: sys.path.append(os.path.join('doc', 'common')) cmlenz@412: try: cmlenz@412: from doctools import build_doc, test_doc cmlenz@412: except ImportError: cmlenz@412: build_doc = test_doc = None cmlenz@412: osimons@646: # Turn off multiprocessing logging osimons@646: # Bug in setuptools/distutils test runner using Python 2.6.2+? osimons@646: import logging osimons@646: if hasattr(logging, 'logMultiprocessing'): osimons@646: logging.logMultiprocessing = 0 osimons@646: osimons@684: NS_old = 'http://bitten.cmlenz.net/tools/' osimons@684: NS_new = 'http://bitten.edgewall.org/tools/' osimons@684: tools = [ osimons@684: 'sh#exec = bitten.build.shtools:exec_', osimons@684: 'sh#pipe = bitten.build.shtools:pipe', osimons@684: 'c#configure = bitten.build.ctools:configure', osimons@684: 'c#autoreconf = bitten.build.ctools:autoreconf', osimons@684: 'c#cppunit = bitten.build.ctools:cppunit', osimons@684: 'c#cunit = bitten.build.ctools:cunit', osimons@684: 'c#gcov = bitten.build.ctools:gcov', osimons@684: 'c#make = bitten.build.ctools:make', osimons@684: 'mono#nunit = bitten.build.monotools:nunit', osimons@684: 'java#ant = bitten.build.javatools:ant', osimons@684: 'java#junit = bitten.build.javatools:junit', osimons@684: 'java#cobertura = bitten.build.javatools:cobertura', osimons@684: 'php#phing = bitten.build.phptools:phing', osimons@684: 'php#phpunit = bitten.build.phptools:phpunit', osimons@684: 'php#coverage = bitten.build.phptools:coverage', osimons@684: 'python#coverage = bitten.build.pythontools:coverage', osimons@684: 'python#distutils = bitten.build.pythontools:distutils', osimons@684: 'python#exec = bitten.build.pythontools:exec_', osimons@684: 'python#figleaf = bitten.build.pythontools:figleaf', osimons@684: 'python#pylint = bitten.build.pythontools:pylint', osimons@684: 'python#trace = bitten.build.pythontools:trace', osimons@684: 'python#unittest = bitten.build.pythontools:unittest', osimons@684: 'svn#checkout = bitten.build.svntools:checkout', osimons@684: 'svn#export = bitten.build.svntools:export', osimons@684: 'svn#update = bitten.build.svntools:update', osimons@684: 'hg#pull = bitten.build.hgtools:pull', osimons@684: 'xml#transform = bitten.build.xmltools:transform' osimons@598: ] osimons@684: recipe_commands = [NS_old + tool for tool in tools] \ osimons@684: + [NS_new + tool for tool in tools] cmlenz@408: osimons@684: class MasterFeature(Feature): osimons@598: osimons@684: def exclude_from(self, dist): osimons@684: # Called when master is disabled (--without-master) osimons@684: pass osimons@684: osimons@684: def include_in(self, dist): osimons@684: # Called when master is enabled (default, or --with-master) osimons@684: dist.metadata.name = 'Bitten' osimons@688: dist.metadata.description = 'Continuous integration for Trac' osimons@684: dist.long_description = "A Trac plugin for collecting software " \ osimons@684: "metrics via continuous integration.""" osimons@684: # Use full manifest when master is included osimons@684: egg_info.manifest_maker.template = "MANIFEST.in" osimons@684: # Include tests in source distribution osimons@684: if 'sdist' in dist.commands: osimons@684: dist.packages = find_packages() osimons@684: else: osimons@684: dist.packages = find_packages(exclude=['*tests*']) osimons@684: dist.test_suite = 'bitten.tests.suite' osimons@684: dist.package_data = { osimons@684: 'bitten': ['htdocs/*.*', osimons@684: 'templates/*.html', osimons@684: 'templates/*.txt']} osimons@684: dist.entry_points['trac.plugins'] = [ osimons@684: 'bitten.admin = bitten.admin', osimons@684: 'bitten.main = bitten.main', osimons@684: 'bitten.master = bitten.master', osimons@684: 'bitten.web_ui = bitten.web_ui', osimons@684: 'bitten.testing = bitten.report.testing', osimons@684: 'bitten.coverage = bitten.report.coverage', osimons@684: 'bitten.lint = bitten.report.lint', osimons@684: 'bitten.notify = bitten.notify'] osimons@684: osimons@684: master = MasterFeature( osimons@684: description = "Bitten Master Trac plugin", osimons@684: standard = True, osimons@684: py_modules = []) osimons@684: osimons@684: egg_info.manifest_maker.template = "MANIFEST-SLAVE.in" osimons@684: osimons@684: if os.path.exists(os.path.join(os.path.dirname(__file__), 'MANIFEST.in')): osimons@684: available_features = {"master": master} osimons@684: else: osimons@684: # Building from a slave distribution osimons@684: available_features = {} osimons@684: osimons@684: setup( osimons@684: name = 'BittenSlave', hodgestar@902: version = '0.6.1', osimons@684: author = 'Edgewall Software', osimons@684: author_email = 'info@edgewall.org', osimons@684: license = 'BSD', osimons@684: url = 'http://bitten.edgewall.org/', osimons@684: download_url = 'http://bitten.edgewall.org/wiki/Download', osimons@684: zip_safe = False, osimons@684: description = 'Continuous integration build slave for Trac', osimons@684: long_description = "A slave for running builds and submitting them to " \ osimons@684: "Bitten, the continuous integration system for Trac", osimons@684: packages = {}, osimons@684: py_modules = ["bitten.__init__", osimons@684: "bitten.build.__init__", osimons@684: "bitten.build.api", osimons@684: "bitten.build.config", osimons@684: "bitten.build.ctools", osimons@684: "bitten.build.hgtools", osimons@684: "bitten.build.javatools", osimons@684: "bitten.build.monotools", osimons@684: "bitten.build.phptools", osimons@684: "bitten.build.pythontools", osimons@684: "bitten.build.shtools", osimons@684: "bitten.build.svntools", osimons@684: "bitten.build.xmltools", osimons@684: "bitten.recipe", osimons@684: "bitten.slave", osimons@684: "bitten.util.__init__", osimons@684: "bitten.util.loc", osimons@684: "bitten.util.testrunner", osimons@684: "bitten.util.xmlio", osimons@684: ], osimons@726: test_suite = 'bitten.tests_slave.suite', osimons@684: tests_require = [ osimons@684: 'figleaf', osimons@684: ], osimons@684: entry_points = { osimons@684: 'console_scripts': [ osimons@684: 'bitten-slave = bitten.slave:main' cmlenz@213: ], osimons@684: 'distutils.commands': [ osimons@684: 'unittest = bitten.util.testrunner:unittest' osimons@684: ], osimons@684: 'bitten.recipe_commands': recipe_commands osimons@684: }, osimons@684: features = available_features, osimons@684: cmdclass = {'build_doc': build_doc, 'test_doc': test_doc} osimons@684: )