From 766dc3ce0e41c8959cc74ee24120869d34503c85 Mon Sep 17 00:00:00 2001 From: portablejim Date: Sat, 23 Sep 2017 21:25:56 +1000 Subject: [PATCH] Better fix for setup.py --- setup.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index a3a5570..735e118 100644 --- a/setup.py +++ b/setup.py @@ -8,26 +8,30 @@ os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6') os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6') +file_includes = [] + base = None targetName = "cursePackDownloader" if sys.platform == "win32": base = "Win32GUI" targetName = "cursePackDownloader.exe" + file_includes = [ + os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'), + os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll') + ] -options = { - 'build_exe': { - 'include_files':[ - os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'), - os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'), - ], - }, +setup_options = { + "build_exe": { + 'include_files': file_includes, + "packages": ["appdirs","idna","chardet","urllib3","certifi","requests"], + } } setup( name="cursePackDownloader", version="0.3", description="Download extra mods from Curse-hosted Minecraft modpacks", - options = options, - executables=[Executable("downloader.py", targetName=targetName)], + options = setup_options, + executables=[Executable("downloader.py", targetName=targetName, base=base)] )