Skip to content

Commit ad0d1e3

Browse files
committed
[python3] Update to 3.12.8, drop Windows 7 support
1 parent 80d54ff commit ad0d1e3

10 files changed

Lines changed: 14 additions & 502 deletions

‎ports/python3/0001-only-build-required-projects.patch‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ index 4d416c589e..ede9868a8f 100644
3636
- <Projects Include="pyshellext.vcxproj" />
3737
+ <Projects Include="pyshellext.vcxproj" Condition="false" />
3838
<!-- Extension modules -->
39-
<ExtensionModules Include="_asyncio;_zoneinfo;_decimal;_elementtree;_msi;_multiprocessing;_overlapped;pyexpat;_queue;select;unicodedata;winsound;_uuid" />
39+
<ExtensionModules Include="_asyncio;_zoneinfo;_decimal;_elementtree;_msi;_multiprocessing;_overlapped;pyexpat;_queue;select;unicodedata;winsound;_uuid;_wmi" />
4040
<ExtensionModules Include="_ctypes" Condition="$(IncludeCTypes)" />
4141
<!-- Extension modules that require external sources -->
4242
<ExternalModules Include="_bz2;_lzma;_sqlite3" />

‎ports/python3/0002-static-library.patch‎

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@ builds the pythoncore as a static library instead of a DLL
99
PCbuild/pythoncore.vcxproj | 4 ++--
1010
2 files changed, 11 insertions(+), 2 deletions(-)
1111

12-
diff --git a/Modules/getpath.c b/Modules/getpath.c
13-
index d7d3cf081e..34269f0b75 100644
14-
--- a/Modules/getpath.c
15-
+++ b/Modules/getpath.c
16-
@@ -801,10 +801,12 @@ static int
17-
library_to_dict(PyObject *dict, const char *key)
18-
{
19-
#ifdef MS_WINDOWS
20-
+#ifdef Py_ENABLE_SHARED
21-
extern HMODULE PyWin_DLLhModule;
22-
if (PyWin_DLLhModule) {
23-
return winmodule_to_dict(dict, key, PyWin_DLLhModule);
24-
}
25-
+#endif
26-
#elif defined(WITH_NEXT_FRAMEWORK)
27-
static char modPath[MAXPATHLEN + 1];
28-
static int modPathInitialized = -1;
2912
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
3013
index d7d3cf081e..34269f0b75 100644
3114
--- a/PC/pyconfig.h
@@ -55,7 +38,7 @@ index d7d3cf081e..34269f0b75 100644
5538
+# endif /* Py_WINVER */
5639
#endif /* MS_COREDLL */
5740

58-
#if defined(MS_WIN64)
41+
#ifdef MS_WIN64
5942
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
6043
index 70c336a9d3..ba797e8afd 100644
6144
--- a/PCbuild/pcbuild.proj
@@ -84,7 +67,7 @@ index 2625d0293d..2f8bdaa931 100644
8467
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
8568
@@ -102,7 +102,7 @@
8669
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
87-
<AdditionalIncludeDirectories>$(PySourcePath)Python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
70+
<AdditionalIncludeDirectories>$(PySourcePath)Modules\_hacl\include;$(PySourcePath)Modules\_hacl\internal;$(PySourcePath)Python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
8871
<AdditionalIncludeDirectories Condition="$(IncludeExternals)">$(zlibDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
8972
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
9073
+ <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -104,36 +87,6 @@ index 2625d0293d..2f8bdaa931 100644
10487
<Optimization>Disabled</Optimization>
10588
<WholeProgramOptimization>false</WholeProgramOptimization>
10689
</ClCompile>
107-
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
108-
index ac49f7867a..f3583345ff 100644
109-
--- a/Python/dynload_win.c
110-
+++ b/Python/dynload_win.c
111-
@@ -163,6 +163,7 @@ static char *GetPythonImport (HINSTANCE hModule)
112-
return NULL;
113-
}
114-
115-
+#ifdef Py_ENABLE_SHARED
116-
/* Load python3.dll before loading any extension module that might refer
117-
to it. That way, we can be sure that always the python3.dll corresponding
118-
to this python DLL is loaded, not a python3.dll that might be on the path
119-
@@ -216,6 +217,7 @@ _Py_CheckPython3(void)
120-
return hPython3 != NULL;
121-
#undef MAXPATHLEN
122-
}
123-
+#endif /* Py_ENABLE_SHARED */
124-
125-
dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
126-
const char *shortname,
127-
@@ -224,7 +226,9 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
128-
dl_funcptr p;
129-
char funcname[258], *import_python;
130-
131-
+#ifdef Py_ENABLE_SHARED
132-
_Py_CheckPython3();
133-
+#endif /* Py_ENABLE_SHARED */
134-
135-
#if USE_UNICODE_WCHAR_CACHE
136-
const wchar_t *wpathname = _PyUnicode_AsUnicode(pathname);
13790
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
13891
index ac49f7867a..f3583345ff 100644
13992
--- a/Python/sysmodule.c

0 commit comments

Comments
 (0)