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

index 710e5e38d4e3ef93fbff845d5c2575bc73fdc624..34500f87cce6d232cc908aa05813c96bb2e62f50 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -1,21 +1,6 @@
 #! /usr/bin/env python
 
-try:
-    from setuptools import setup
-    is_setuptools = True
-except ImportError:
-    from distutils.core import setup
-    is_setuptools = False
-
-kw = {}
-if is_setuptools:
-    kw['extras_require'] = {
-        'Metakit': ['Mk4py'],
-        'ZODB': ['ZODB'],
-        'mx': ['mx.DateTime', 'mx.Misc'],
-        }
-
-    kw['python_requires'] = '>=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
+from setuptools import setup
 
 setup(name = "m_lib",
     version = "3.1.0",
@@ -47,5 +32,10 @@ setup(name = "m_lib",
         "m_lib.pbar", "m_lib.rus",
     ],
     namespace_packages = ["m_lib"],
-    **kw
+    python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+    extras_require={
+        'Metakit': ['Mk4py'],
+        'ZODB': ['ZODB'],
+        'mx': ['mx.DateTime', 'mx.Misc'],
+    },
 )