From 03c97299c4743973cb12e53c8b50b00ce948e729 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 8 Oct 2020 12:30:35 +0100 Subject: [PATCH] setup.py: win32 OPTIONS and DATA_FILES formatting --- setup.py | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/setup.py b/setup.py index aaaa4a85..b4615ac6 100755 --- a/setup.py +++ b/setup.py @@ -160,27 +160,36 @@ if sys.platform == 'darwin': } DATA_FILES = [] -elif sys.platform=='win32': - OPTIONS = { 'py2exe': - {'dist_dir': dist_dir, - 'optimize': 2, - 'packages': [ - 'sqlite3', # Included for plugins - ], - 'includes': [ - 'dataclasses', - 'shutil', # Included for plugins - 'timeout_session', - 'zipfile', # Included for plugins - ], - 'excludes': [ 'distutils', '_markerlib', 'optparse', 'PIL', 'pkg_resources', 'simplejson', 'unittest' ], - } +elif sys.platform == 'win32': + OPTIONS = { + 'py2exe': { + 'dist_dir': dist_dir, + 'optimize': 2, + 'packages': [ + 'sqlite3', # Included for plugins + ], + 'includes': [ + 'dataclasses', + 'shutil', # Included for plugins + 'timeout_session', + 'zipfile', # Included for plugins + ], + 'excludes': [ + 'distutils', + '_markerlib', + 'optparse', + 'PIL', + 'pkg_resources', + 'simplejson', + 'unittest' + ], + } } DATA_FILES = [ ('', [ 'WinSparkle.dll', - 'WinSparkle.pdb', # For debugging - don't include in package + 'WinSparkle.pdb', # For debugging - don't include in package 'EUROCAPS.TTF', 'Changelog.md', 'commodity.csv', @@ -191,12 +200,12 @@ elif sys.platform=='win32': 'ships.p', 'stations.p', 'systems.p', - '%s.VisualElementsManifest.xml' % appname, - '%s.ico' % appname, + f'{appname}.VisualElementsManifest.xml', + f'{appname}.ico', 'EDMarketConnector - TRACE.bat', 'EDMarketConnector - localserver-auth.bat', ]), - ('L10n', [join('L10n',x) for x in os.listdir('L10n') if x.endswith('.strings')]), + ('L10n', [join('L10n', x) for x in os.listdir('L10n') if x.endswith('.strings')]), ('plugins', PLUGINS), ]