Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit2c62f06

Browse files
authored
Merge pull request#17076 from QuLogic/old-setup
Fix SyntaxErrors when running setup in old Python
2 parents0917934 +dabc706 commit2c62f06

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

‎setup.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
ifsys.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)forninmin_version)),
21+
""".format('.'.join(str(n)forninmin_version),
22+
'.'.join(str(n)forninsys.version_info[:3]))
2123
sys.exit(error)
2224

2325
frompathlibimportPath
@@ -112,8 +114,9 @@ def _download_jquery_to(dest):
112114
try:
113115
buff=download_or_cache(url,sha)
114116
exceptException:
115-
raiseIOError(f"Failed to download jquery-ui. Please download "
116-
f"{url} and extract it to{dest}.")
117+
raiseIOError(
118+
"Failed to download jquery-ui. Please download "
119+
"{url} and extract it to {dest}.".format(url=url,dest=dest))
117120
withZipFile(buff)aszf:
118121
zf.extractall(dest)
119122

@@ -154,7 +157,7 @@ def run(self):
154157
# If the user just queries for information, don't bother figuring out which
155158
# packages to build or install.
156159
ifnot (any('--'+optinsys.argv
157-
foroptin[*Distribution.display_option_names,'help'])
160+
foroptinDistribution.display_option_names+ ['help'])
158161
or'clean'insys.argv):
159162
# Go through all of the packages and figure out which ones we are
160163
# going to build/install.
@@ -169,10 +172,11 @@ def run(self):
169172
try:
170173
message=package.check()
171174
exceptsetupext.Skippedase:
172-
print_status(package.name,f"no [{e}]")
175+
print_status(package.name,"no [{e}]".format(e=e))
173176
continue
174177
ifmessageisnotNone:
175-
print_status(package.name,f"yes [{message}]")
178+
print_status(package.name,
179+
"yes [{message}]".format(message=message))
176180
good_packages.append(package)
177181

178182
print_raw()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp