It's not easy to install Python 3 on Ubuntu 16.04, so work around the difference... v1.8.45
authorCarl Hetherington <cth@carlh.net>
Tue, 20 Dec 2022 11:21:59 +0000 (12:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 20 Dec 2022 11:21:59 +0000 (12:21 +0100)
wscript

diff --git a/wscript b/wscript
index fc9a5bbe01f69d0e72cbbd6cf0ada618c9483bae..54b965637a05075f7d4e0d4df37f4180b0dbd0fe 100644 (file)
--- a/wscript
+++ b/wscript
@@ -34,7 +34,6 @@
 import subprocess
 import os
 import sys
-assert sys.version_info.major == 3
 import shlex
 import distutils.spawn
 from waflib import Logs, Context
@@ -49,6 +48,10 @@ if this_version == '':
 else:
     VERSION = this_version[1:].strip()
 
+if sys.version_info.major == 2:
+    # Handle Python 2 (for Ubuntu 16.04)
+    VERSION = VERSION.encode('UTF-8')
+
 API_VERSION = '-1.0'
 
 def options(opt):