Skip to content

Commit

Permalink
reset python2 compatibility in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 20, 2024
1 parent aa5591e commit 5ebf60d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def missdeps(cmdline):
else:
s += ". Perhaps Python header files are not installed. "
s += "Try running:\n"
s += f" {cmdline}"
s += " %s" % cmdline
print(hilite(s, color="red", bold=True), file=sys.stderr)


Expand Down Expand Up @@ -247,7 +247,7 @@ def unix_can_compile(c_code):

def get_winver():
maj, min = sys.getwindowsversion()[0:2]
return f"0x0{maj * 100 + min}"
return '0x0%s' % ((maj * 100) + min)

if sys.getwindowsversion()[0] < 6:
msg = "this Windows version is too old (< Windows Vista); "
Expand Down Expand Up @@ -429,7 +429,7 @@ def get_winver():
)

else:
sys.exit(f"platform {sys.platform} is not supported")
sys.exit('platform %s is not supported' % sys.platform)


if POSIX:
Expand Down Expand Up @@ -568,12 +568,13 @@ def main():
if LINUX:
pyimpl = "pypy" if PYPY else "python"
if shutil.which("dpkg"):
missdeps(f"sudo apt-get install gcc {pyimpl}3-dev")
missdeps("sudo apt-get install gcc %s3-dev" % (pyimpl))
elif shutil.which("rpm"):
missdeps(f"sudo yum install gcc {pyimpl}-devel")
missdeps("sudo yum install gcc %s-devel" % (pyimpl))
elif shutil.which("apk"):
missdeps(
f"sudo apk add gcc {pyimpl}-dev musl-dev linux-headers"
"sudo apk add gcc %s%s-dev musl-dev linux-headers"
% (pyimpl)
)
elif MACOS:
msg = (
Expand Down

0 comments on commit 5ebf60d

Please sign in to comment.