diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 25 |
1 files changed, 3 insertions, 22 deletions
@@ -1,28 +1,9 @@ # coding: utf-8 -from distutils.core import setup, Command +from setuptools import setup import os.path import json_diff -class RunTests(Command): - """New setup.py command to run all tests for the package. - """ - description = "run all tests for the package" - - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - import unittest - import test.test_json_diff - unittest.TextTestRunner(verbosity=2).run(test.test_json_diff.suite) - - def read(fname): f = open(os.path.join(os.path.dirname(__file__), fname)) out = "\n" + f.read().replace("\r\n", "\n") @@ -45,7 +26,7 @@ setup( py_modules=['json_diff'], long_description=get_long_description(), keywords=['json', 'diff'], - cmdclass={'test': RunTests}, + test_suite='test.test_json_diff', classifiers=[ "Programming Language :: Python", "Development Status :: 4 - Beta", @@ -55,5 +36,5 @@ setup( "Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: General", - ] + ] ) |