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

Skip to content

Commit 294b3f2

Browse files
authored
Merge pull request #18895 from timhoffm/python-dep
Introduce variable since which mpl version the minimal python version
2 parents ba82993 + f9907b4 commit 294b3f2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

setup.py

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

11-
min_version = (3, 7)
11+
py_min_version = (3, 7) # minimal supported python version
12+
since_mpl_version = (3, 4) # py_min_version is required since this mpl version
1213

13-
if sys.version_info < min_version:
14+
if sys.version_info < py_min_version:
1415
error = """
15-
Beginning with Matplotlib 3.4, Python {0} or above is required.
16-
You are using Python {1}.
16+
Beginning with Matplotlib {0}, Python {1} or above is required.
17+
You are using Python {2}.
1718
1819
This may be due to an out of date pip.
1920
2021
Make sure you have pip >= 9.0.1.
21-
""".format('.'.join(str(n) for n in min_version),
22+
""".format('.'.join(str(n) for n in since_mpl_version),
23+
'.'.join(str(n) for n in py_min_version),
2224
'.'.join(str(n) for n in sys.version_info[:3]))
2325
sys.exit(error)
2426

@@ -281,7 +283,7 @@ def build_extensions(self):
281283
ext_modules=[Extension("", [])],
282284
package_data=package_data,
283285

284-
python_requires='>={}'.format('.'.join(str(n) for n in min_version)),
286+
python_requires='>={}'.format('.'.join(str(n) for n in py_min_version)),
285287
setup_requires=[
286288
"certifi>=2020.06.20",
287289
"numpy>=1.16",

0 commit comments

Comments
 (0)