From 793175f665321e50a8b375f89f6e65e0053d6365 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 18 Jul 2021 14:44:42 +0300 Subject: [PATCH] Delete extra data dirs that cause problems for WiX. --- packaging/createmsi.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packaging/createmsi.py b/packaging/createmsi.py index fa1e64494..c55688a0d 100755 --- a/packaging/createmsi.py +++ b/packaging/createmsi.py @@ -176,6 +176,7 @@ class PackageGenerator: pyinst_cmd += ['meson.py'] subprocess.check_call(pyinst_cmd) shutil.move(pyinstaller_tmpdir + '/meson', main_stage) + self.del_infodirs(main_stage) if not os.path.exists(os.path.join(main_stage, 'meson.exe')): sys.exit('Meson exe missing from staging dir.') os.mkdir(ninja_stage) @@ -183,6 +184,14 @@ class PackageGenerator: if not os.path.exists(os.path.join(ninja_stage, 'ninja.exe')): sys.exit('Ninja exe missing from staging dir.') + def del_infodirs(self, dirname): + # Starting with 3.9.something there are some + # extra metadatadirs that have a hyphen in their + # file names. This is a forbidden character in WiX + # filenames so delete them. + for d in glob(os.path.join(dirname, '*-info')): + shutil.rmtree(d) + def generate_files(self): ''' Generate package files for MSI installer package