From 2416450498a418bd6daf9f8bac255a47064079e6 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Fri, 12 Dec 2014 22:32:47 +0100 Subject: Make python 2.7 default again and clean up. Switch setup.py to use setuptools. Fixes #1, fixes #2 --- setup.py | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index e5379e1..af06596 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import sys -from distutils.core import setup, Command +from setuptools import setup import io try: import unittest2 as unittest @@ -11,26 +11,6 @@ except ImportError: import gg_scraper -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): - tests = unittest.TestLoader().discover('test') - runner = unittest.TextTestRunner(verbosity=2) - res = runner.run(tests) - sys.exit(int(not res.wasSuccessful())) - - classifiers = [ 'Development Status :: 3 - Alpha', 'Operating System :: OS Independent', @@ -58,7 +38,6 @@ setup(name='gg_scraper', keywords=['email', 'Google Groups', 'scrap', 'backup'], license='GNU GPL', classifiers=classifiers, - cmdclass={ - 'test': RunTests, - }, - requires=['beautifulsoup4', 'PyYAML']) + test_suite="test", + requires=['beautifulsoup4', 'PyYAML'] +) -- cgit