]> git.phdru.name Git - cookiecutter.git/commitdiff
Build(setup.py): Use python_requires keyword
authorOleg Broytman <phd@phdru.name>
Mon, 11 Dec 2017 18:03:30 +0000 (21:03 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 11 Dec 2017 18:03:30 +0000 (21:03 +0300)
project_template/setup.py

index 608972879ee9d087ad1c55e4c82c414c8adeb88b..f988f7cbad61f7d527bea9e2c9be31f96cd65350 100755 (executable)
@@ -10,6 +10,10 @@ 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.*'
+
 versionpath = join(abspath(dirname(__file__)), '{project}', '__version__.py')
 load_source('{project}_version', versionpath)
 # Ignore: E402 module level import not at top of file
@@ -44,4 +48,5 @@ setup(name='{project}',
       package_data={'{project}': []},
       scripts=[],
       requires=[],
+      **kw
       )