Skip to content

Commit

Permalink
Delete extra data dirs that cause problems for WiX.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpakkane committed Jul 21, 2021
1 parent 5d36d29 commit 793175f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packaging/createmsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,22 @@ def build_dist(self):
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)
shutil.copy(shutil.which('ninja'), ninja_stage)
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
Expand Down

0 comments on commit 793175f

Please sign in to comment.