diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-27 00:56:26 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-03-30 02:06:52 +0300 |
commit | 258cd5d5836a6660f1122cec274f0a947c1d0459 (patch) | |
tree | 72f1ecb04c9c3540aa03ba23ef512a2a1c00ea32 /packaging/createpkg.py | |
parent | ff8a9c9efb9937e7d7776bba8b85930ed44192fa (diff) | |
download | meson-258cd5d5836a6660f1122cec274f0a947c1d0459.zip meson-258cd5d5836a6660f1122cec274f0a947c1d0459.tar.gz meson-258cd5d5836a6660f1122cec274f0a947c1d0459.tar.bz2 |
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.
Diffstat (limited to 'packaging/createpkg.py')
-rwxr-xr-x | packaging/createpkg.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/packaging/createpkg.py b/packaging/createpkg.py index 533b3b9..70da656 100755 --- a/packaging/createpkg.py +++ b/packaging/createpkg.py @@ -22,8 +22,6 @@ import xml.etree.ElementTree as ET sys.path.append(os.getcwd()) from mesonbuild import coredata -from createmsi import get_modules - class PkgGenerator: def __init__(self): @@ -46,10 +44,9 @@ class PkgGenerator: pyinstaller_bin = '/Users/jpakkane/Library/Python/3.8/bin/pyinstaller' pyinst_cmd = [pyinstaller_bin, '--clean', + '--additional-hooks-dir=packaging', '--distpath', self.pkg_dir] - for m in get_modules(): - pyinst_cmd += ['--hidden-import', m] pyinst_cmd += ['meson.py'] subprocess.check_call(pyinst_cmd) tmpdir = os.path.join(self.pkg_dir, 'meson') |