]> git.phdru.name Git - mimedecode.git/commitdiff
Build(setup.py): Use setuptools instead of distutils
authorOleg Broytman <phd@phdru.name>
Wed, 28 Mar 2018 19:58:00 +0000 (22:58 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 28 Mar 2018 19:58:00 +0000 (22:58 +0300)
setup.py

index 09bae63d31b2d8844c97d45fc0d8e10f2b17108b..452cb1cbff6584c4efd29b7e770dff7e331240bb 100755 (executable)
--- 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'],
 )