From e5ae9cbc87c7fab8fe8070e14118e78b2311c5d6 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 28 Mar 2018 22:58:00 +0300 Subject: [PATCH] Build(setup.py): Use setuptools instead of distutils --- setup.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/setup.py b/setup.py index 09bae63..452cb1c 100755 --- a/setup.py +++ b/setup.py @@ -2,24 +2,11 @@ from imp import load_source from os.path import abspath, dirname, join - -try: - from setuptools import setup - is_setuptools = True -except ImportError: - from distutils.core import setup - is_setuptools = False +from setuptools import setup versionpath = join(abspath(dirname(__file__)), "mimedecode", "__version__.py") mimedecode_version = load_source("mimedecode_version", versionpath) -kw = {} -if is_setuptools: - kw['install_requires'] = ['m_lib.defenc>=1.0'] - kw['tests_require'] = ['m_lib>=3.1'] - kw['python_requires'] = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*' - - setup( name="mimedecode", version=mimedecode_version.__version__, @@ -54,5 +41,7 @@ setup( 'mimedecode = mimedecode.__main__:main' ] }, - **kw + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*', + install_requires=['m_lib.defenc>=1.0'], + tests_require=['m_lib>=3.1'], ) -- 2.39.5