summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-19 12:34:09 +0100
committerCarl Hetherington <cth@carlh.net>2022-12-19 12:34:09 +0100
commitb6b03cfe02dcbb8f5a9ffbccbded943e47585880 (patch)
tree4d286baaff9afcb6773f72317d45d35be5d5c56a
parent4ffb6aef6f75f87505298ff3e4b1a37bd77febed (diff)
More adventures in strings and python versions. Stop allowing Python 2 to run this script.v1.8.44
-rw-r--r--wscript5
1 files changed, 3 insertions, 2 deletions
diff --git a/wscript b/wscript
index e05252d4..fc9a5bbe 100644
--- a/wscript
+++ b/wscript
@@ -34,14 +34,15 @@
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()