From 68455af9cd842132c03ab87b6f14a2e1e769a77c Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Fri, 16 Dec 2016 15:47:01 +0100 Subject: Switch to setuptools --- setup.py | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/setup.py b/setup.py index 5e21d41..bb99b07 100644 --- a/setup.py +++ b/setup.py @@ -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", - ] + ] ) -- cgit