cmlenz@4: #!/usr/bin/env python cmlenz@379: # -*- coding: utf-8 -*- cmlenz@5: # osimons@832: # 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@682: from setuptools import setup, find_packages, Feature osimons@682: 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@683: NS_old = 'http://bitten.cmlenz.net/tools/' osimons@683: NS_new = 'http://bitten.edgewall.org/tools/' osimons@683: tools = [ osimons@683: 'sh#exec = bitten.build.shtools:exec_', osimons@683: 'sh#pipe = bitten.build.shtools:pipe', osimons@683: 'c#configure = bitten.build.ctools:configure', osimons@683: 'c#autoreconf = bitten.build.ctools:autoreconf', osimons@683: 'c#cppunit = bitten.build.ctools:cppunit', osimons@683: 'c#cunit = bitten.build.ctools:cunit', osimons@683: 'c#gcov = bitten.build.ctools:gcov', osimons@683: 'c#make = bitten.build.ctools:make', osimons@683: 'mono#nunit = bitten.build.monotools:nunit', osimons@683: 'java#ant = bitten.build.javatools:ant', osimons@683: 'java#junit = bitten.build.javatools:junit', osimons@683: 'java#cobertura = bitten.build.javatools:cobertura', osimons@683: 'php#phing = bitten.build.phptools:phing', osimons@683: 'php#phpunit = bitten.build.phptools:phpunit', osimons@683: 'php#coverage = bitten.build.phptools:coverage', osimons@683: 'python#coverage = bitten.build.pythontools:coverage', osimons@683: 'python#distutils = bitten.build.pythontools:distutils', osimons@683: 'python#exec = bitten.build.pythontools:exec_', osimons@683: 'python#figleaf = bitten.build.pythontools:figleaf', osimons@683: 'python#pylint = bitten.build.pythontools:pylint', osimons@683: 'python#trace = bitten.build.pythontools:trace', osimons@683: 'python#unittest = bitten.build.pythontools:unittest', osimons@683: 'svn#checkout = bitten.build.svntools:checkout', osimons@683: 'svn#export = bitten.build.svntools:export', osimons@683: 'svn#update = bitten.build.svntools:update', osimons@683: 'hg#pull = bitten.build.hgtools:pull', osimons@683: 'xml#transform = bitten.build.xmltools:transform' osimons@598: ] osimons@683: recipe_commands = [NS_old + tool for tool in tools] \ osimons@683: + [NS_new + tool for tool in tools] osimons@598: osimons@682: class MasterFeature(Feature): osimons@682: osimons@682: def exclude_from(self, dist): osimons@682: # Called when master is disabled (--without-master) osimons@682: pass osimons@682: osimons@682: def include_in(self, dist): osimons@682: # Called when master is enabled (default, or --with-master) osimons@682: dist.metadata.name = 'Bitten' osimons@687: dist.metadata.description = 'Continuous integration for Trac' osimons@682: dist.long_description = "A Trac plugin for collecting software " \ osimons@682: "metrics via continuous integration.""" osimons@682: # Use full manifest when master is included osimons@682: egg_info.manifest_maker.template = "MANIFEST.in" osimons@682: # Include tests in source distribution osimons@682: if 'sdist' in dist.commands: osimons@682: dist.packages = find_packages() osimons@682: else: osimons@682: dist.packages = find_packages(exclude=['*tests*']) osimons@682: dist.test_suite = 'bitten.tests.suite' osimons@682: dist.package_data = { osimons@682: 'bitten': ['htdocs/*.*', osimons@682: 'templates/*.html', osimons@682: 'templates/*.txt']} osimons@682: dist.entry_points['trac.plugins'] = [ osimons@682: 'bitten.admin = bitten.admin', osimons@682: 'bitten.main = bitten.main', osimons@682: 'bitten.master = bitten.master', osimons@682: 'bitten.web_ui = bitten.web_ui', osimons@682: 'bitten.testing = bitten.report.testing', osimons@682: 'bitten.coverage = bitten.report.coverage', osimons@682: 'bitten.lint = bitten.report.lint', osimons@682: 'bitten.notify = bitten.notify'] osimons@682: osimons@682: master = MasterFeature( osimons@682: description = "Bitten Master Trac plugin", osimons@682: standard = True, osimons@682: py_modules = []) osimons@682: osimons@682: egg_info.manifest_maker.template = "MANIFEST-SLAVE.in" osimons@682: osimons@682: if os.path.exists(os.path.join(os.path.dirname(__file__), 'MANIFEST.in')): osimons@682: available_features = {"master": master} osimons@682: else: osimons@682: # Building from a slave distribution osimons@682: available_features = {} osimons@682: osimons@682: setup( osimons@682: name = 'BittenSlave', osimons@682: version = '0.7', osimons@682: author = 'Edgewall Software', osimons@682: author_email = 'info@edgewall.org', osimons@682: license = 'BSD', osimons@682: url = 'http://bitten.edgewall.org/', osimons@682: download_url = 'http://bitten.edgewall.org/wiki/Download', osimons@682: zip_safe = False, osimons@682: description = 'Continuous integration build slave for Trac', osimons@682: long_description = "A slave for running builds and submitting them to " \ osimons@682: "Bitten, the continuous integration system for Trac", osimons@682: packages = {}, osimons@682: py_modules = ["bitten.__init__", osimons@682: "bitten.build.__init__", osimons@682: "bitten.build.api", osimons@682: "bitten.build.config", osimons@682: "bitten.build.ctools", osimons@682: "bitten.build.hgtools", osimons@682: "bitten.build.javatools", osimons@682: "bitten.build.monotools", osimons@682: "bitten.build.phptools", osimons@682: "bitten.build.pythontools", osimons@682: "bitten.build.shtools", osimons@682: "bitten.build.svntools", osimons@682: "bitten.build.xmltools", osimons@682: "bitten.recipe", osimons@682: "bitten.slave", osimons@682: "bitten.util.__init__", osimons@682: "bitten.util.loc", osimons@682: "bitten.util.testrunner", osimons@682: "bitten.util.xmlio", osimons@682: ], osimons@725: test_suite = 'bitten.tests_slave.suite', osimons@682: tests_require = [ osimons@682: 'figleaf', osimons@682: ], osimons@682: entry_points = { osimons@682: 'console_scripts': [ osimons@682: 'bitten-slave = bitten.slave:main' cmlenz@213: ], osimons@682: 'distutils.commands': [ osimons@682: 'unittest = bitten.util.testrunner:unittest' osimons@682: ], osimons@682: 'bitten.recipe_commands': recipe_commands osimons@682: }, osimons@682: features = available_features, osimons@682: cmdclass = {'build_doc': build_doc, 'test_doc': test_doc} osimons@682: )