From b6b03cfe02dcbb8f5a9ffbccbded943e47585880 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 19 Dec 2022 12:34:09 +0100 Subject: More adventures in strings and python versions. Stop allowing Python 2 to run this script. --- wscript | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'wscript') 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() -- cgit v1.2.3