From: Oleg Broytman Date: Wed, 28 Mar 2018 19:58:00 +0000 (+0300) Subject: Build(setup.py): Use setuptools instead of distutils X-Git-Tag: 3.0.0~9 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=e5ae9cbc87c7fab8fe8070e14118e78b2311c5d6;p=mimedecode.git Build(setup.py): Use setuptools instead of distutils --- 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'], )