From 13b8070685fe1994fff8ee28cf18ca8f52aec1b9 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 28 Mar 2018 22:55:52 +0300 Subject: [PATCH] Use setuptools instead of distutils --- project_template/setup.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) 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 ) -- 2.39.5