diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2020-11-24 15:41:56 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-11-27 18:12:08 +0200 |
commit | 0fa808f7066d20047c0576da064bcc105053c401 (patch) | |
tree | f39a5784acc4d35a1075583e4a33ff8f3c53b03e /run_meson_command_tests.py | |
parent | df50123c058bd1e76c1b3230b4f27531f0adfe07 (diff) | |
download | meson-0fa808f7066d20047c0576da064bcc105053c401.zip meson-0fa808f7066d20047c0576da064bcc105053c401.tar.gz meson-0fa808f7066d20047c0576da064bcc105053c401.tar.bz2 |
Add script to create a zipapp.
Invoke create_zipapp.py from the root of the repository and it will
create a minimal zipapp with only the mesonbuild module code and a
__main__.py directly copied from meson.py
The meson.py launcher already tracks the desired entry point, and its
only other effect is to add the mesonbuild directory to the path if it
exists, which it won't in the zipapp. So there's no need to duplicate
this into another __main__.py
Diffstat (limited to 'run_meson_command_tests.py')
-rwxr-xr-x | run_meson_command_tests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/run_meson_command_tests.py b/run_meson_command_tests.py index 7bc6185..795e545 100755 --- a/run_meson_command_tests.py +++ b/run_meson_command_tests.py @@ -193,9 +193,10 @@ class CommandTests(unittest.TestCase): def test_meson_zipapp(self): if is_windows(): raise unittest.SkipTest('NOT IMPLEMENTED') - source = Path(__file__).resolve().parent.as_posix() + source = Path(__file__).resolve().parent target = self.tmpdir / 'meson.pyz' - zipapp.create_archive(source=source, target=target, interpreter=python_command[0], main=None) + script = source / 'packaging' / 'create_zipapp.py' + self._run([script.as_posix(), source, '--outfile', target, '--interpreter', python_command[0]]) self._run([target.as_posix(), '--help']) |