packaging: ensure that --python is an absolute path when building on Windows
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 05 Apr 2019 23:07:11 -0400
changeset 42091 57645939df59
parent 42090 9c07d345fd6d
child 42092 91cc8dc866ed
packaging: ensure that --python is an absolute path when building on Windows For whatever reason, even though only python2 is on PATH, passing `python.exe` causes the later check that it's not py3 to bail out.
contrib/packaging/inno/build.py
contrib/packaging/wix/build.py
--- a/contrib/packaging/inno/build.py	Fri Apr 05 22:47:45 2019 -0400
+++ b/contrib/packaging/inno/build.py	Fri Apr 05 23:07:11 2019 -0400
@@ -30,6 +30,9 @@
 
     args = parser.parse_args()
 
+    if not os.path.isabs(args.python):
+        raise Exception('--python arg must be an absolute path')
+
     if args.iscc:
         iscc = pathlib.Path(args.iscc)
     else:
--- a/contrib/packaging/wix/build.py	Fri Apr 05 22:47:45 2019 -0400
+++ b/contrib/packaging/wix/build.py	Fri Apr 05 23:07:11 2019 -0400
@@ -62,6 +62,9 @@
         'version': args.version,
     }
 
+    if not os.path.isabs(args.python):
+        raise Exception('--python arg must be an absolute path')
+
     if args.extra_packages_script:
         kwargs['extra_packages_script'] = args.extra_packages_script
     if args.extra_wxs: