Source

trac-gviz / trac-dev / gviz / setup.py

Diff from to

File trac-dev/gviz/setup.py

     from setuptools import setup
 except ImportError:
     from distutils.core import setup
+    dist_cmds = {}
+else :
+    # Hack: distutils command to run tests at testrun.org (Hudson ;o)
+    from setuptools.command.test import test
+    
+    class test_ci(test):
+      def finalize_options(self):
+        # Install JUnit XML runner
+        try :
+          self.distribution.tests_require.append('unittest-xml-reporting')
+        except :
+          self.distribution.tests_require = ['unittest-xml-reporting']
+        
+        # Use JUnit XML runner by default
+        if self.test_runner is None:
+            self.test_runner = 'xmlrunner:XMLTestRunner'
+        
+        test.finalize_options(self)
+    
+    dist_cmds = {'test_ci' : test_ci}
 
 from tracgviz.__init__ import __doc__ as DESC
 
 PKG_INFO = {'tracgviz' : ('tracgviz',                     # Package dir
                             # Package data
                             ['templates/*', 'htdocs/*', 
-                      		    'messages/es/LC_MESSAGES/*', '../CHANGES', 
+                              'messages/es/LC_MESSAGES/*', '../CHANGES', 
                               '../COPYRIGHT', '../NOTICE', '../README', 
-                              '../TODO', '../examples/*'],
+                              '../TODO'],
                           ), 
             'tracgviz.testing' : ('tracgviz/testing',     # Package dir
                             # Package data
                             ['data/**'],
                           ), 
-            'tracgviz.ig' : ('tracgviz/ig',                     # Package dir
-                            # Package data
+            'tracgviz.ig' : ('tracgviz/ig',               # Package dir
+                           # Package data
                             ['templates/*', 'htdocs/*'],
                           ), 
             }
                """
 
 setup(
-	name=DIST_NM,
-	version=latest,
-	description=DESC.split('\n', 1)[0],
-	author='Olemis Lang',
-	author_email='olemis@gmail.com',
-	maintainer='Olemis Lang',
-	maintainer_email='olemis@gmail.com',
-	url='https://opensvn.csie.org/traccgi/swlcu/wiki/En/Devel/%s' % (DIST_NM,),
-	download_url='http://pypi.python.org/packages/2.5/%s/%s/%s-%s-py2.5.egg' % \
-	                              (DIST_NM[0], DIST_NM, DIST_NM, latest,),
-	requires = ['trac', 'tracrpc', 'gviz_api', 'pygments', 'dutest'],
+  name=DIST_NM,
+  version=latest,
+  description=DESC.split('\n', 1)[0],
+  author='Olemis Lang',
+  author_email='olemis@gmail.com',
+  maintainer='Olemis Lang',
+  maintainer_email='olemis@gmail.com',
+  url='https://projects.olemix.com/cgi-bin/trac.cgi/wiki/En/Devel/%s' % (DIST_NM,),
+  download_url='http://pypi.python.org/packages/2.5/%s/%s/%s-%s-py2.5.egg' % \
+                                (DIST_NM[0], DIST_NM, DIST_NM, latest,),
+  requires = ['trac', 'tracrpc', 'gviz_api', 'pygments', 'dutest'],
+  tests_require = ['dutest>=0.2.4'],
   install_requires = [
       'setuptools>=0.6b1',
       'Trac>=0.11',
       'TracXMLRPC<1.0.7',
       'Pygments>=1.0',
-      'dutest>=0.2.3',
   ],
-	package_dir = dict([p, i[0]] for p, i in PKG_INFO.iteritems()),
-	packages = PKG_INFO.keys(),
-	package_data = dict([p, i[1]] for p, i in PKG_INFO.iteritems()),
-	include_package_data=True,
-	provides = ['%s (%s)' % (p, latest) for p in PKG_INFO.keys()],
-	obsoletes = ['%s (>=%s.0.0, <%s)' % (p, versions[-1][0], latest) \
-	              for p in PKG_INFO.keys()],
-	entry_points = ENTRY_POINTS,
-	classifiers = cats,
-	long_description= DESC
-	)
+  package_dir = dict([p, i[0]] for p, i in PKG_INFO.iteritems()),
+  packages = PKG_INFO.keys(),
+  package_data = dict([p, i[1]] for p, i in PKG_INFO.iteritems()),
+  include_package_data=True,
+  provides = ['%s (%s)' % (p, latest) for p in PKG_INFO.keys()],
+  obsoletes = ['%s (>=%s.0.0, <%s)' % (p, versions[-1][0], latest) \
+                for p in PKG_INFO.keys()],
+  entry_points = ENTRY_POINTS,
+  classifiers = cats,
+  long_description= DESC,
+  cmd_class = dist_cmds,
+  )