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

index 9f9614d75e5f26d0e0340d25a1d3755a373397c0..76e7f8dba9e5cac663eafebd45e2d6bc14e83652 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -2,22 +2,7 @@
 
 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
-
-kw = {}
-if is_setuptools:
-    kw['python_requires'] = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
-    kw['install_requires'] = ['m_lib.defenc>=1.0']
-    kw['extras_require'] = {
-        'm_lib': ['m_lib>=3.1'],
-        'pbar': ['m_lib>=3.1'],
-    }
+from setuptools import setup
 
 versionpath = join(abspath(dirname(__file__)), 'm_librarian', '__version__.py')
 m_librarian_version = load_source('m_librarian_version', versionpath)
@@ -55,5 +40,10 @@ setup(name='m_librarian',
       },
       scripts=['scripts/ml-import.py', 'scripts/ml-initdb.py',
                'scripts/ml-search.py'],
-      **kw
+      python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+      install_requires=['m_lib.defenc>=1.0'],
+      extras_require={
+          'm_lib': ['m_lib>=3.1'],
+          'pbar': ['m_lib>=3.1'],
+      },
       )