Another attempt to fix UTF-8/byte SNAFUs in wscript. v1.8.42
authorCarl Hetherington <cth@carlh.net>
Sat, 17 Dec 2022 21:16:38 +0000 (22:16 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 17 Dec 2022 21:16:38 +0000 (22:16 +0100)
wscript

diff --git a/wscript b/wscript
index ae73448dbea2fbba0752d9cd3f9572e1b4902285..41b6ea6a04dd5fec72ae963ef94e967022374aad 100644 (file)
--- a/wscript
+++ b/wscript
@@ -40,13 +40,13 @@ from waflib import Logs, Context
 
 APPNAME = 'libdcp'
 
-this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0].decode('UTF-8')
-last_version = subprocess.Popen(shlex.split('git describe --tags --abbrev=0'), stdout=subprocess.PIPE).communicate()[0].decode('UTF-8')
+this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE, encoding='UTF-8').communicate()[0]
+last_version = subprocess.Popen(shlex.split('git describe --tags --abbrev=0'), stdout=subprocess.PIPE, encoding='UTF-8').communicate()[0]
 
 if this_version == '':
-    VERSION = '%sdevel' % last_version[1:].strip().encode('UTF-8')
+    VERSION = '%sdevel' % last_version[1:].strip()
 else:
-    VERSION = this_version[1:].strip().encode('UTF-8')
+    VERSION = this_version[1:].strip()
 
 API_VERSION = '-1.0'