#!/usr/bin/env python

import sys
from distutils.core import setup, Command

cmdclass = {}

# class TestCommand(Command):
#     description = "run package tests"
#     user_options = [
#         # Use None because 'v' would conflict with global verbose option
#         ("verbosity=", None, "Django test runner verbosity level. [default=1]"),
#     ]

#     def initialize_options(self):
#         self.verbosity = 1

#     def finalize_options(self):
#         self.verbosity = int(self.verbosity)

#     def run(self):
#         from override_settings.run_tests import run_tests
#         sys.exit(run_tests(self.verbosity))

# cmdclass['test'] = TestCommand

setup(
    name             = "django-override-settings",
    version          = "1.2",
    author           = "Eric Davis",
    author_email     = "ed@npri.org",
    description      = "Provide a way to override Django's settings when running tests",
    long_description = open('README.rst').read(),
    url              = "http://github.com/edavis/django-override-settings/",
    packages         = ['override_settings'],
    cmdclass         = cmdclass,
    classifiers      = [
        "Development Status :: 5 - Production/Stable",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Natural Language :: English",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Software Development :: Testing",
    ],
)

@@ -20,19 +20,8 @@
 on%0A%0A
-import sys%0A
 from
@@ -52,602 +52,8 @@
 etup
-, Command%0A%0Acmdclass = %7B%7D%0A%0A# class TestCommand(Command):%0A#     description = %22run package tests%22%0A#     user_options = %5B%0A#         # Use None because 'v' would conflict with global verbose option%0A#         (%22verbosity=%22, None, %22Django test runner verbosity level. %5Bdefault=1%5D%22),%0A#     %5D%0A%0A#     def initialize_options(self):%0A#         self.verbosity = 1%0A%0A#     def finalize_options(self):%0A#         self.verbosity = int(self.verbosity)%0A%0A#     def run(self):%0A#         from override_settings.run_tests import run_tests%0A#         sys.exit(run_tests(self.verbosity))%0A%0A# cmdclass%5B'test'%5D = TestCommand
 %0A%0Ase
@@ -429,16 +429,16 @@
 ings/%22,%0A
+
     pack
@@ -479,41 +479,8 @@
 '%5D,%0A
-    cmdclass         = cmdclass,%0A
     

Clean up setup.py