Can't use the encoding parameter to Popen as it's Python 3.6+ only. v1.8.43
authorCarl Hetherington <cth@carlh.net>
Mon, 19 Dec 2022 09:34:43 +0000 (10:34 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 19 Dec 2022 09:34:43 +0000 (10:34 +0100)
wscript

diff --git a/wscript b/wscript
index 41b6ea6a04dd5fec72ae963ef94e967022374aad..e05252d49e77d319af23e6f994ba697951287694 100644 (file)
--- a/wscript
+++ b/wscript
@@ -40,8 +40,8 @@ from waflib import Logs, Context
 
 APPNAME = 'libdcp'
 
-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]
+this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0].encode('UTF-8')
+last_version = subprocess.Popen(shlex.split('git describe --tags --abbrev=0'), stdout=subprocess.PIPE).communicate()[0].encode('UTF-8')
 
 if this_version == '':
     VERSION = '%sdevel' % last_version[1:].strip()