diff setup.py @ 4:ad5a8748afcf

Add test framework
author Ben Croston <ben@croston.org>
date Wed, 31 Aug 2011 21:35:14 +0100
parents 43595981978d
children 685479d1f0a7
line wrap: on
line diff
--- a/setup.py	Tue Aug 30 23:40:42 2011 +0100
+++ b/setup.py	Wed Aug 31 21:35:14 2011 +0100
@@ -5,28 +5,32 @@
 import platform
 
 classifiers = ['Development Status :: 3 - Alpha',
-               'Operating System :: Microsoft :: Windows',
-               'Operating System :: Unix',
-               "Operating System :: MacOS :: MacOS X",
+               'Operating System :: OS Independent',
                'License :: OSI Approved :: MIT License',
+               'Intended Audience :: Developers',
+               'Programming Language :: Python :: 2.6',
                'Programming Language :: Python :: 2.7',
                'Programming Language :: Python :: 3',
                'Topic :: Software Development',
-               'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
-               'Topic :: Internet :: WWW/HTTP :: HTTP Servers']
+               'Topic :: Internet :: WWW/HTTP :: WSGI']
+
+install_requires = []
+exclude = []
+extra = {}
 
 if platform.python_version().startswith('2'):
-    # python 2.x
-    packages = find_packages()
-    install_requires = ['webob>=1.0.0']
-else:
-    # assume python 3.x
-    packages = find_packages(exclude=['server'])
-    install_requires = []
+    # we can build server with python 2
+    install_requires.append('webob>=1.0.0')
+    extra['test_suite'] = 'wibble.tests.suite'
+
+if platform.python_version().startswith('3'):
+    # we can't build server with python 3
+    exclude.append('wibble.server')
+    extra['use_2to3'] = True
 
 setup(name             = 'Wibble',
       version          = '0.0.1a',
-      packages         = packages,
+      packages         = find_packages(exclude=exclude),
       install_requires = install_requires,
       author           = 'Ben Croston',
       author_email     = 'ben@croston.org',
@@ -34,7 +38,8 @@
       long_description = open('README.txt').read(),
       license          = 'MIT',
       keywords         = 'jsonrpc',
-      url              = 'http://www.wyre-it.co.uk/wibble/', 
-      classifiers      = classifiers, 
-      use_2to3         = True)
+      url              = 'http://www.wyre-it.co.uk/wibble/',
+      classifiers      = classifiers,
+      platforms        = ['Any'],
+      **extra)