From da7604f39fcf0047560c65f2c6dfcc4e8a6f72b9 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Fri, 27 Oct 2023 20:18:32 -0700 Subject: [PATCH] Add Python 3.12 to Windows .exe installer --- ChangeLog.md | 1 + tools/w32/make-package.sh | 8 ++++---- tools/w32/w32-install.nsi | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index d16d7a77ea..354f17457f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,7 @@ ChangeLog {#changelog} # HEAD - We no longer provide packages for Ubuntu 18.04 LTS (Bionic Beaver), as it reached end of life in May 2023. +- The Windows .exe installer now supports Python 3.12. # 2.19.0 - 2023-06-22 # {#changelog_2_19_0} - Most IMP Value and Object types can now be serialized (or pickled in Python). diff --git a/tools/w32/make-package.sh b/tools/w32/make-package.sh index 889566412f..44e577fce3 100755 --- a/tools/w32/make-package.sh +++ b/tools/w32/make-package.sh @@ -11,8 +11,8 @@ # make DESTDIR=`pwd`/w32-inst install # # Where $w32py is the path containing Python headers and libraries. -# Repeat for all desired Python versions (3.6, 3.7, 3.8, 3.9, 3.10 and 3.11 -# for us) +# Repeat for all desired Python versions (3.6, 3.7, 3.8, 3.9, 3.10, 3.11, +# and 3.12 for us) # # Then run (still in the binary directory) # /tools/w32/make-package.sh @@ -87,7 +87,7 @@ for app in ${ROOT}/bin/*; do done # Make Python version-specific directories for extensions (.pyd) -PYVERS="3.6 3.7 3.8 3.9 3.10 3.11" +PYVERS="3.6 3.7 3.8 3.9 3.10 3.11 3.12" for PYVER in ${PYVERS}; do mkdir ${ROOT}/python/python${PYVER} || exit 1 mkdir ${ROOT}/python/python${PYVER}/_ihm_pyd || exit 1 @@ -114,7 +114,7 @@ rm -rf ${ROOT}/bin/imp_example_app.exe \ # Remove any .svn directories rm -rf `find ${ROOT} -name .svn` -PYVERS="36 37 38 39 310 311" +PYVERS="36 37 38 39 310 311 312" if [ "${BITS}" = "32" ]; then MAKENSIS="makensis" DLLSRC=/usr/lib/w32comp/windows/system diff --git a/tools/w32/w32-install.nsi b/tools/w32/w32-install.nsi index b292904d28..9063f96b59 100644 --- a/tools/w32/w32-install.nsi +++ b/tools/w32/w32-install.nsi @@ -87,6 +87,7 @@ Section "" WriteRegStr HKLM "Software\Python\PythonCore\3.9${PYTHON_ARCH_SUFFIX}\PythonPath\${PRODVER}" "" "$INSTDIR\python" WriteRegStr HKLM "Software\Python\PythonCore\3.10${PYTHON_ARCH_SUFFIX}\PythonPath\${PRODVER}" "" "$INSTDIR\python" WriteRegStr HKLM "Software\Python\PythonCore\3.11${PYTHON_ARCH_SUFFIX}\PythonPath\${PRODVER}" "" "$INSTDIR\python" + WriteRegStr HKLM "Software\Python\PythonCore\3.12${PYTHON_ARCH_SUFFIX}\PythonPath\${PRODVER}" "" "$INSTDIR\python" !insertmacro MUI_STARTMENU_WRITE_BEGIN ${PRODVER} CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" @@ -121,6 +122,7 @@ Section "Uninstall" DeleteRegKey HKLM "Software\Python\PythonCore\3.9${PYTHON_ARCH_SUFFIX}\PythonPath\${PRODVER}" DeleteRegKey HKLM "Software\Python\PythonCore\3.10${PYTHON_ARCH_SUFFIX}\PythonPath\${PRODVER}" DeleteRegKey HKLM "Software\Python\PythonCore\3.11${PYTHON_ARCH_SUFFIX}\PythonPath\${PRODVER}" + DeleteRegKey HKLM "Software\Python\PythonCore\3.12${PYTHON_ARCH_SUFFIX}\PythonPath\${PRODVER}" SectionEnd