Commit Graph

4 Commits

Author SHA1 Message Date
Eli Schwartz 6aceb7e2d6
packaging: fix regression that prevented pyinstaller from getting custom deps
mesonbuild.dependencies.* is now lazy-imported and not automatically
detected. Add them as hidden imports.

Fixes #12036
2023-07-25 13:29:29 -04:00
Eli Schwartz e66b07e6fb fix data collection with pyinstaller
pyinstaller considers .py files to not be data by default. The entire
architecture of pyinstaller is, in fact, different from zipapp or
unpacked modules -- because it actually has to use a resource loader
with on-disk files *separate* from the module itself. So just because a
file gets packaged in the application does not mean it's usable as an
importlib.resources compatible resource.

Although we collect data files in general, we need to make sure that .py
files are collected from scripts, because we may try to run them
standalone from an external process.

Fixes #11689
2023-04-17 11:36:55 +03:00
Eli Schwartz 7ceec99c55 packaging: make sure pyinstaller sees our distributed data files
Running pyinstaller to create a bundle, and using the resulting
`pyinst-tmp/meson/meson setup ...` with the cmake module revealed that
no data files were being bundled, unlike what we did for setup.cfg. Fix
this oversight.

Fixes #10163
2022-04-09 14:20:31 +03:00
Eli Schwartz 258cd5d583 packaging: rework how pyinstaller gets its instructions
Make use of pyinstaller hooks by creating a hook that updates how the
`mesonbuild` import functions.

This is more or less the same as passing a bajillion arguments to
pyinstaller's CLI, but allows the logic to be self-contained (and
reusable). It becomes more obvious what parts of the process pertain to
pyinstaller, and which parts pertain to MSI/pkg creation.
2022-03-30 02:06:52 +03:00