Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 964372c

Browse filesBrowse files
authored
Merge pull request #17187 from timhoffm/auto-backport-of-pr-17076-on-v3.2.x
Backport PR #17076: Fix SyntaxErrors when running setup in old Python
2 parents 114afa7 + 5f3204f commit 964372c
Copy full SHA for 964372c

File tree

Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
if sys.version_info < min_version:
1414
error = """
1515
Beginning with Matplotlib 3.1, Python {0} or above is required.
16+
You are using Python {1}.
1617
1718
This may be due to an out of date pip.
1819
1920
Make sure you have pip >= 9.0.1.
20-
""".format('.'.join(str(n) for n in min_version)),
21+
""".format('.'.join(str(n) for n in min_version),
22+
'.'.join(str(n) for n in sys.version_info[:3]))
2123
sys.exit(error)
2224

2325
from pathlib import Path
@@ -136,8 +138,9 @@ def _download_jquery_to(dest):
136138
try:
137139
buff = download_or_cache(url, sha)
138140
except Exception:
139-
raise IOError(f"Failed to download jquery-ui. Please download "
140-
f"{url} and extract it to {dest}.")
141+
raise IOError(
142+
"Failed to download jquery-ui. Please download "
143+
"{url} and extract it to {dest}.".format(url=url, dest=dest))
141144
with ZipFile(buff) as zf:
142145
zf.extractall(dest)
143146

@@ -178,7 +181,7 @@ def run(self):
178181
# If the user just queries for information, don't bother figuring out which
179182
# packages to build or install.
180183
if not (any('--' + opt in sys.argv
181-
for opt in [*Distribution.display_option_names, 'help'])
184+
for opt in Distribution.display_option_names + ['help'])
182185
or 'clean' in sys.argv):
183186
# Go through all of the packages and figure out which ones we are
184187
# going to build/install.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.