From d21d58f12c3e0d0a136256be941181a6b9698faa Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 6 Jan 2020 03:32:01 +0100 Subject: [PATCH] makepackage: don't install Python 2.7 bindings by default in installer --- makepanda/installer.nsi | 10 +++------- makepanda/makepackage.py | 8 ++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/makepanda/installer.nsi b/makepanda/installer.nsi index f800fa222c..f96f6f15b9 100644 --- a/makepanda/installer.nsi +++ b/makepanda/installer.nsi @@ -136,12 +136,8 @@ var MANPAGE !if "${PYVER}" == "${INCLUDE_PYVER}" SectionIn 1 2 3 !else - !if "${PYVER}" == "2.7" - SectionIn 1 2 - !else - ; See .onInit function where this is dynamically enabled. - SectionIn 2 - !endif + ; See .onInit function where this is dynamically enabled. + SectionIn 2 !endif SetDetailsPrint both @@ -528,7 +524,7 @@ Function .onInit SetRegView ${REGVIEW} !endif - ; We never check for 2.7; it is always enabled in Auto mode + ; We never check for 2.7; it is always disabled in Auto mode !if "${REGVIEW}" == "32" !insertmacro MaybeEnablePyBindingSection 3.5-32 !insertmacro MaybeEnablePyBindingSection 3.6-32 diff --git a/makepanda/makepackage.py b/makepanda/makepackage.py index 395cbbb467..9729f0e3f3 100755 --- a/makepanda/makepackage.py +++ b/makepanda/makepackage.py @@ -650,9 +650,9 @@ def MakeInstallerOSX(version, python_versions=[], installdir=None, **kwargs): for version_info in python_versions: pyver = version_info["version"] - if pyver == "2.7": - # Always install Python 2.7 by default; it's included on macOS. - cond = "true" + if pyver in ("2.7", "3.4"): + # Don't install these EOL versions of Python by default. + cond = "false" else: cond = "isPythonVersionInstalled('%s')" % (pyver) dist.write(' \n' % (pyver, cond, pyver, pyver)) @@ -963,7 +963,7 @@ def MakeInstaller(version, **kwargs): fn += version python_versions = kwargs.get('python_versions', []) - if len(python_versions) == 1 and python_versions[0]["version"] != "2.7": + if len(python_versions) == 1: fn += '-py' + python_versions[0]["version"] if GetOptimize() <= 2: