+# Ensure that these are not unicode, which
+# can cause odd problems elsewhere. Note that
+# in python3, encode and decode do not return
+# strings, so we have to force the type.
+VERSION = V.encode ('ascii', 'ignore').decode ("utf-8")
+PROGRAM_VERSION = MAJOR.encode ('ascii', 'ignore').decode ("utf-8")
+
+if len (sys.argv) > 1 and sys.argv[1] == 'dist':
+ if not 'APPNAME' in os.environ:
+ print ("You must define APPNAME in the environment when running ./waf dist")
+ sys.exit (1)
+ APPNAME = os.environ['APPNAME'];