import os

from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()

requires = [
    'SQLAlchemy',
    'pyramid',
    'pyramid_debugtoolbar',
    'pyramid_tm',
    'transaction',
    'waitress',
    'zope.sqlalchemy',

    'cryptacular',
    'deform',
    'misaka',
    'psycopg2',
    'pyramid_deform',
    'pyramid_mailer',
    'pyramid_mako',

    'coverage',
    'nose',
    ]

setup(name='usingnamespace',
      version='0.0',
      description='usingnamespace',
      long_description=README + '\n\n' +  CHANGES,
      classifiers=[
        "Programming Language :: Python",
        "Framework :: Pyramid",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
        ],
      author='Bert JW Regeer',
      author_email='bertjw@regeer.org',
      url='http://usingnamespace.com/',
      keywords='web wsgi bfg pylons pyramid',
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      test_suite='usingnamespace',
      install_requires=requires,
      entry_points="""\
      [paste.app_factory]
      main = usingnamespace:main
      [console_scripts]
      usingnamespace_init_db = usingnamespace.scripts.initializedb:main
      usingnamespace_destroy_db = usingnamespace.scripts.destroydb:main
      """,
      )


@@ -262,36 +262,8 @@
 d',%0A
-    'pyramid_debugtoolbar',%0A
     
@@ -466,34 +466,154 @@
 o',%0A
-%0A    'coverage',%0A    'nose
+    %5D%0A%0Atests_require = %5B%5D%0A%0Atesting_requires =  tests_require + %5B%0A    'nose',%0A    'coverage',%0A    %5D%0A%0Adevelop_requires = %5B%0A    'pyramid_debugtoolbar
 ',%0A 
@@ -1233,32 +1233,38 @@
 ='usingnamespace
+.tests
 ',%0A      install
@@ -1283,16 +1283,167 @@
 quires,%0A
+      tests_require=tests_require,%0A      extras_require = %7B%0A          'develop': develop_requires,%0A          'testing': testing_requires,%0A          %7D,%0A
       en

Clean up setup.py a little