More adventures in strings and python versions. Stop allowing Python 2 to run this... v1.8.44
authorCarl Hetherington <cth@carlh.net>
Mon, 19 Dec 2022 11:34:09 +0000 (12:34 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 19 Dec 2022 11:34:09 +0000 (12:34 +0100)
wscript

diff --git a/wscript b/wscript
index e05252d49e77d319af23e6f994ba697951287694..fc9a5bbe01f69d0e72cbbd6cf0ada618c9483bae 100644 (file)
--- a/wscript
+++ b/wscript
 import subprocess
 import os
 import sys
+assert sys.version_info.major == 3
 import shlex
 import distutils.spawn
 from waflib import Logs, Context
 
 APPNAME = 'libdcp'
 
-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')
+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')
 
 if this_version == '':
     VERSION = '%sdevel' % last_version[1:].strip()