py3: stringify setupversion on Windows
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 19 Oct 2018 22:31:47 -0400
changeset 40383 a9e303dcd1e1
parent 40382 bd1ec1e36bf0
child 40384 fc4c598dd4a0
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.
setup.py
--- a/setup.py	Fri Oct 19 23:47:38 2018 -0400
+++ b/setup.py	Fri Oct 19 22:31:47 2018 -0400
@@ -1063,7 +1063,7 @@
 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()