From 4cc0138a28da30a1f0cbc5cf07ab33cc15d7c577 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Aug 2022 13:05:12 +0530 Subject: [PATCH] Delete the frozen python dir I verified that all the files remaining in it are loaded via the python resource system and so are not needed. --- bypy/linux/__main__.py | 1 + bypy/macos/__main__.py | 1 + 2 files changed, 2 insertions(+) diff --git a/bypy/linux/__main__.py b/bypy/linux/__main__.py index 69e7f430c..889777293 100644 --- a/bypy/linux/__main__.py +++ b/bypy/linux/__main__.py @@ -143,6 +143,7 @@ def copy_python(env): iv['sanitize_source_folder'](os.path.join(env.py_dir, x)) py_compile(env.py_dir) freeze_python(env.py_dir, pdir, env.obj_dir, ext_map, develop_mode_env_var='KITTY_DEVELOP_FROM', remove_pyc_files=True) + shutil.rmtree(env.py_dir) def build_launcher(env): diff --git a/bypy/macos/__main__.py b/bypy/macos/__main__.py index c716f2ceb..4b6c4bc01 100644 --- a/bypy/macos/__main__.py +++ b/bypy/macos/__main__.py @@ -369,6 +369,7 @@ class Freeze(object): iv['sanitize_source_folder'](join(self.python_stdlib, x)) self.compile_py_modules() freeze_python(self.python_stdlib, pdir, self.obj_dir, ext_map, develop_mode_env_var='KITTY_DEVELOP_FROM', remove_pyc_files=True) + shutil.rmtree(self.python_stdlib) iv['build_frozen_launcher']([path_to_freeze_dir(), self.obj_dir]) os.rename(join(dirname(self.contents_dir), 'bin', 'kitty'), join(self.contents_dir, 'MacOS', 'kitty')) shutil.rmtree(join(dirname(self.contents_dir), 'bin'))