Cleanup: move EqualityOptions into its own file.
[libdcp.git] / wscript
diff --git a/wscript b/wscript
index e05252d49e77d319af23e6f994ba697951287694..54b965637a05075f7d4e0d4df37f4180b0dbd0fe 100644 (file)
--- a/wscript
+++ b/wscript
@@ -40,14 +40,18 @@ 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()
 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):