diff options
author | Timothy Edmund Crosley <timothy.crosley@gmail.com> | 2018-09-22 22:04:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-22 22:04:42 -0700 |
commit | 8e831f364621eaab152bb7b3308a1ed0418f7326 (patch) | |
tree | a8f914f01cfde126b1e25681f41c943e5a5c6563 /setup.py | |
parent | 1a6dcfe7f2713559211623fbbc276064b77fd034 (diff) | |
parent | 4b31b9e1924f8c481f8172c0fddda1c0370d30d7 (diff) | |
download | isort-8e831f364621eaab152bb7b3308a1ed0418f7326.tar.gz |
Merge pull request #749 from jdufresne/distutils
Drop legacy distutils fallback in setup.py
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 39 |
1 files changed, 2 insertions, 37 deletions
@@ -1,39 +1,6 @@ #!/usr/bin/env python -import subprocess -import sys - -try: - from setuptools import setup - from setuptools.command.test import test as TestCommand - - class PyTest(TestCommand): - extra_kwargs = {'tests_require': ['pytest', 'mock']} - - def finalize_options(self): - TestCommand.finalize_options(self) - self.test_args = [] - self.test_suite = True - - def run_tests(self): - import pytest - sys.exit(pytest.main(self.test_args)) - -except ImportError: - from distutils.core import setup, Command - - class PyTest(Command): - extra_kwargs = {} - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - raise SystemExit(subprocess.call([sys.executable, 'runtests.py'])) +from setuptools import setup with open('README.rst', 'r') as f: readme = f.read() @@ -60,7 +27,6 @@ setup(name='isort', }, install_requires=['futures; python_version < "3.2"'], python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", - cmdclass={'test': PyTest}, keywords='Refactor, Python, Python2, Python3, Refactoring, Imports, Sort, Clean', classifiers=['Development Status :: 6 - Mature', 'Intended Audience :: Developers', @@ -78,5 +44,4 @@ setup(name='isort', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries', - 'Topic :: Utilities'], - **PyTest.extra_kwargs) + 'Topic :: Utilities']) |