Re-fix python3 wscript problem.
authorCarl Hetherington <cth@carlh.net>
Thu, 17 Jan 2019 20:01:13 +0000 (20:01 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 3 Dec 2019 16:02:35 +0000 (17:02 +0100)
src/wscript
wscript

index 08c9bd77810076403ee886fe90a0f29789e999ba..638a89d4316a08481f0684d69576c77a84001c56 100644 (file)
@@ -3,9 +3,7 @@ def configure(conf):
     # Don't include the micro version number in PACKAGE_VERSION, as
     # this ends up in MXFs and screws up DCP-o-matic's test references
     # every time it changes
-    print(conf.env.VERSION)
-    s = conf.env.VERSION.split(b'.')
-    print(s)
+    s = conf.env.VERSION.split('.')
     major_minor = '%s.%s.0' % (s[0], s[1])
     conf.env.append_value('CXXFLAGS', '-DPACKAGE_VERSION="%s"' % major_minor)
     if conf.options.target_windows:
diff --git a/wscript b/wscript
index ff44e841d2cb09eecf0bc50f2336aa533ac5cadb..791325f8aa7d4abac8e7bddc89983029362284ca 100644 (file)
--- a/wscript
+++ b/wscript
@@ -8,8 +8,8 @@ from waflib import Logs
 APPNAME = 'libasdcp-cth'
 
 if os.path.exists('.git'):
-    this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0]
-    last_version = subprocess.Popen(shlex.split('git describe --tags --abbrev=0'), stdout=subprocess.PIPE).communicate()[0]
+    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()
     else: