##// END OF EJS Templates
packaging: add command line flag to add extra vars to pyoxidizer...
Augie Fackler -
r48444:be37bb8d default
parent child Browse files
Show More
@@ -64,6 +64,7 b' def build_wix('
64 extra_packages_script=None,
64 extra_packages_script=None,
65 extra_wxs=None,
65 extra_wxs=None,
66 extra_features=None,
66 extra_features=None,
67 extra_pyoxidizer_vars=None,
67 ):
68 ):
68 if not pyoxidizer_target and not python:
69 if not pyoxidizer_target and not python:
69 raise Exception("--python required unless building with PyOxidizer")
70 raise Exception("--python required unless building with PyOxidizer")
@@ -105,7 +106,7 b' def build_wix('
105 "timestamp_url": sign_timestamp_url,
106 "timestamp_url": sign_timestamp_url,
106 }
107 }
107
108
108 fn(**kwargs)
109 fn(**kwargs, extra_pyoxidizer_vars=extra_pyoxidizer_vars)
109
110
110
111
111 def get_parser():
112 def get_parser():
@@ -168,6 +169,12 b' def get_parser():'
168 "in the installer from the extra wxs files"
169 "in the installer from the extra wxs files"
169 ),
170 ),
170 )
171 )
172
173 sp.add_argument(
174 "--extra-pyoxidizer-vars",
175 help="json map of extra variables to pass to pyoxidizer",
176 )
177
171 sp.set_defaults(func=build_wix)
178 sp.set_defaults(func=build_wix)
172
179
173 return parser
180 return parser
@@ -8,6 +8,7 b''
8 # no-check-code because Python 3 native.
8 # no-check-code because Python 3 native.
9
9
10 import collections
10 import collections
11 import json
11 import os
12 import os
12 import pathlib
13 import pathlib
13 import re
14 import re
@@ -386,6 +387,7 b' def build_installer_pyoxidizer('
386 extra_wxs: typing.Optional[typing.Dict[str, str]] = None,
387 extra_wxs: typing.Optional[typing.Dict[str, str]] = None,
387 extra_features: typing.Optional[typing.List[str]] = None,
388 extra_features: typing.Optional[typing.List[str]] = None,
388 signing_info: typing.Optional[typing.Dict[str, str]] = None,
389 signing_info: typing.Optional[typing.Dict[str, str]] = None,
390 extra_pyoxidizer_vars=None,
389 ):
391 ):
390 """Build a WiX MSI installer using PyOxidizer."""
392 """Build a WiX MSI installer using PyOxidizer."""
391 hg_build_dir = source_dir / "build"
393 hg_build_dir = source_dir / "build"
@@ -418,6 +420,9 b' def build_installer_pyoxidizer('
418 if signing_info["timestamp_url"]:
420 if signing_info["timestamp_url"]:
419 build_vars["TIME_STAMP_SERVER_URL"] = signing_info["timestamp_url"]
421 build_vars["TIME_STAMP_SERVER_URL"] = signing_info["timestamp_url"]
420
422
423 if extra_pyoxidizer_vars:
424 build_vars.update(json.loads(extra_pyoxidizer_vars))
425
421 if extra_wxs:
426 if extra_wxs:
422 raise Exception(
427 raise Exception(
423 "support for extra .wxs files has been temporarily dropped"
428 "support for extra .wxs files has been temporarily dropped"
General Comments 0
You need to be logged in to leave comments. Login now