[PATCH] py3: stringify setupversion on Windows
Matt Harbison
mharbison72 at gmail.com
Sat Oct 20 02:37:42 UTC 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1540002707 14400
# Fri Oct 19 22:31:47 2018 -0400
# Node ID 9a6381bc4f3274cef01128948b9afb94f97e67f7
# Parent e2173cfb0be91129c66d499e2449f06e4d4b8eec
py3: stringify setupversion on Windows
This was stringified a few lines above for non Windows platforms, but `version`
remains bytes. The old code effectively undid the conversion, and triggered a
warning in setuptools when building.
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1063,7 +1063,7 @@ if py2exeloaded:
if os.name == 'nt':
# Windows binary file versions for exe/dll files must have the
# form W.X.Y.Z, where W,X,Y,Z are numbers in the range 0..65535
- setupversion = version.split(b'+', 1)[0]
+ setupversion = setupversion.split(r'+', 1)[0]
if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[1].splitlines()
More information about the Mercurial-devel
mailing list