From 44570e818a2cf0a20f8efbc0d47a06e7e216d2ae Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 19 Mar 2020 17:24:48 +0100 Subject: [PATCH] Don't pretend to support old pythons in setup.py. setup.py uses f-strings, so it fails with SyntaxError on Py<3.6, so let's not pretend to support older Pythons there. (The alternative would be to only put the version check in setup.py and then move *everything* else into setupext.py, which may not be silly either?) --- setup.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/setup.py b/setup.py index 3b2eb28a8c02..19928a4743f3 100644 --- a/setup.py +++ b/setup.py @@ -3,24 +3,8 @@ setup.cfg.template for more information. """ -# NOTE: This file must remain Python 2 compatible for the foreseeable future, -# to ensure that we error out properly for people with outdated setuptools -# and/or pip. -import sys - -min_version = (3, 6) - -if sys.version_info < min_version: - error = """ -Beginning with Matplotlib 3.1, Python {0} or above is required. - -This may be due to an out of date pip. - -Make sure you have pip >= 9.0.1. -""".format('.'.join(str(n) for n in min_version)), - sys.exit(error) - from pathlib import Path +import sys import shutil from zipfile import ZipFile @@ -256,7 +240,7 @@ def run(self): package_data=package_data, classifiers=classifiers, - python_requires='>={}'.format('.'.join(str(n) for n in min_version)), + python_requires=">=3.6", setup_requires=[ "numpy>=1.15", ],