From: Oleg Broytman Date: Wed, 28 Mar 2018 19:55:52 +0000 (+0300) Subject: Use setuptools instead of distutils X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=13b8070685fe1994fff8ee28cf18ca8f52aec1b9;p=cookiecutter.git Use setuptools instead of distutils --- diff --git a/project_template/setup.py b/project_template/setup.py index 9cde6ed..816581f 100755 --- a/project_template/setup.py +++ b/project_template/setup.py @@ -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 )