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

index 9cde6ed1e10b260d611cdefe27d0105a2901494e..816581f61249961f2e90809eef6f785356799873 100755 (executable)
@@ -2,17 +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.*'
+from setuptools import setup
 
 versionpath = join(abspath(dirname(__file__)), '{project}', '__version__.py')
 {project}_version = load_source('{project}_version', versionpath)
@@ -45,6 +35,6 @@ setup(name='{project}',
       packages=['{project}'],
       package_data={'{project}': []},
       scripts=[],
+      python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*',
       requires=[],
-      **kw
       )