Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef6fe2e

Browse files
authored
Merge pull request #13637 from tacaswell/bld_parameterize_python_requires
BLD: parameterize python_requires
2 parents 21f1355 + 8e23676 commit ef6fe2e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
# and/or pip.
99
import sys
1010

11-
if sys.version_info < (3, 6):
11+
min_version = (3, 6)
12+
13+
if sys.version_info < min_version:
1214
error = """
13-
Beginning with Matplotlib 3.1, Python 3.6 or above is required.
15+
Beginning with Matplotlib 3.1, Python {0} or above is required.
1416
1517
This may be due to an out of date pip.
1618
1719
Make sure you have pip >= 9.0.1.
18-
"""
20+
""".format('.'.join(str(n) for n in min_version)),
1921
sys.exit(error)
2022

2123
from io import BytesIO
@@ -283,7 +285,7 @@ def run(self):
283285
classifiers=classifiers,
284286
download_url="http://matplotlib.org/users/installing.html",
285287

286-
python_requires='>=3.6',
288+
python_requires='>={}'.format('.'.join(str(n) for n in min_version)),
287289
# List third-party Python packages that we require
288290
install_requires=install_requires,
289291
setup_requires=setup_requires,

0 commit comments

Comments
 (0)