--extra-packages-script and PyOxidizer (was: Re: D8477: packaging: support building WiX installers with PyOxidizer)

Gregory Szorc gregory.szorc at gmail.com
Wed Nov 18 23:03:35 UTC 2020


On Wed, Nov 18, 2020 at 2:40 PM Augie Fackler <raf at durin42.com> wrote:

>
>
> > On Apr 30, 2020, at 01:53, indygreg (Gregory Szorc) <
> phabricator at mercurial-scm.org> wrote:
> >
> > REVISION DETAIL
> >  https://phab.mercurial-scm.org/D8477
> >
> > AFFECTED FILES
> >  contrib/packaging/hgpackaging/cli.py
> >  contrib/packaging/hgpackaging/wix.py
> >  contrib/packaging/wix/mercurial.wxs
> >
>
> [snip other diff regions]
>
> > diff --git a/contrib/packaging/hgpackaging/cli.py
> b/contrib/packaging/hgpackaging/cli.py
> > --- a/contrib/packaging/hgpackaging/cli.py
> > +++ b/contrib/packaging/hgpackaging/cli.py
> > @@ -50,6 +50,7 @@
> [snip misc hunks]
>
> >     if extra_packages_script:
> > +        if pyoxidizer_target:
> > +            raise Exception(
> > +                "pyoxidizer does not support --extra-packages-script"
> > +            )
>
> Is this a fundamental limitation, or is there just some code to write to
> make this? I need to inject our custom extension into the MSI we distribute
> to our users, and I figure this is probably roughly the way. I'm finally to
> the point that I appear to have the rest of the process working, so now I
> "just" need to wire up including the Google-custom bits.
>

The problem is that there's no easy way to pass conditional state into the
Starlark execution environment outside of changing the name of the target
you want to build and having different targets for different configurations.

One way to address this would be to expose environment variables as
Starlark variables. Or a `--var key=value` syntax to register custom
variables. These features may or may not have been requested in the
PyOxidizer issue tracker. Both are reasonable IMO. Would you mind
commenting on or filing a GitHub issue representing the feature you think
works best?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20201118/345d6ad3/attachment.html>


More information about the Mercurial-devel mailing list