Skip to content

Commit

Permalink
Remove new Python syntax from setup.py.
Browse files Browse the repository at this point in the history
We cannot yet rely on pip to be new enough to recognize out
python_requires, and we get several reports of broken syntax on older
Python.
  • Loading branch information
QuLogic committed Apr 8, 2020
1 parent 66d675a commit 13ee932
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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)),
""".format('.'.join(str(n) for n in min_version))
sys.exit(error)

from pathlib import Path
Expand Down Expand Up @@ -112,8 +112,9 @@ def _download_jquery_to(dest):
try:
buff = download_or_cache(url, sha)
except Exception:
raise IOError(f"Failed to download jquery-ui. Please download "
f"{url} and extract it to {dest}.")
raise IOError(
"Failed to download jquery-ui. Please download "
"{url} and extract it to {dest}.".format(url=url, dest=dest))
with ZipFile(buff) as zf:
zf.extractall(dest)

Expand Down Expand Up @@ -154,7 +155,7 @@ def run(self):
# If the user just queries for information, don't bother figuring out which
# packages to build or install.
if not (any('--' + opt in sys.argv
for opt in [*Distribution.display_option_names, 'help'])
for opt in Distribution.display_option_names + ['help'])
or 'clean' in sys.argv):
# Go through all of the packages and figure out which ones we are
# going to build/install.
Expand All @@ -169,10 +170,11 @@ def run(self):
try:
message = package.check()
except setupext.Skipped as e:
print_status(package.name, f"no [{e}]")
print_status(package.name, "no [{e}]".format(e=e))
continue
if message is not None:
print_status(package.name, f"yes [{message}]")
print_status(package.name,
"yes [{message}]".format(message=message))
good_packages.append(package)

print_raw()
Expand Down

0 comments on commit 13ee932

Please sign in to comment.