aboutsummaryrefslogtreecommitdiff
path: root/ports/python3
diff options
context:
space:
mode:
authorChristian Rendina <christian.rendina@gmail.com>2021-05-27 00:09:28 +0200
committerGitHub <noreply@github.com>2021-05-26 15:09:28 -0700
commit9d7244f2f6a4f6a34c4e0b3ecbf391323e379a43 (patch)
treefbfabcd43ab805f1ca9ca3e3ad176b0c2ce8eef5 /ports/python3
parent6fc4e607f1f0c46aa4692fbf3c6ce99dfef64b12 (diff)
downloadvcpkg-9d7244f2f6a4f6a34c4e0b3ecbf391323e379a43.tar.gz
vcpkg-9d7244f2f6a4f6a34c4e0b3ecbf391323e379a43.zip
[python3] Update to 3.9.5 (#17773)
* [python3] update to 3.9.5 * [vcpkg] update baseline * [scripts] update to py 3.9.5
Diffstat (limited to 'ports/python3')
-rw-r--r--ports/python3/0007-restore-support-for-windows-7.patch78
-rw-r--r--ports/python3/portfile.cmake4
-rw-r--r--ports/python3/vcpkg.json3
3 files changed, 69 insertions, 16 deletions
diff --git a/ports/python3/0007-restore-support-for-windows-7.patch b/ports/python3/0007-restore-support-for-windows-7.patch
index 4efb19012..837666393 100644
--- a/ports/python3/0007-restore-support-for-windows-7.patch
+++ b/ports/python3/0007-restore-support-for-windows-7.patch
@@ -5,15 +5,72 @@ Subject: [PATCH 7/7] restore support for windows 7
this backports the windows 7 compatible fix for bpo-39401 from gh-18234,
originally authored by Steve Dower, and removes explicit dependencies on
-pathcch.
----
- PC/getpathp.c | 55 +++++++++++++++++++++++++++++++++++---
- PC/pyconfig.h | 4 +--
- PCbuild/pythoncore.vcxproj | 2 +-
- 3 files changed, 54 insertions(+), 7 deletions(-)
+pathcch.
+The same mechanism is applied to fix posixmodule.c
+---
+diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+index c984e2e..6c9787a 100644
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -18,7 +18,7 @@
+
+ FSCTL_GET_REPARSE_POINT is not exported with WIN32_LEAN_AND_MEAN. */
+ # include <windows.h>
+-# include <pathcch.h>
++# include <Shlwapi.h>
+ #endif
+
+ #include "pycore_ceval.h" // _PyEval_ReInitThreads()
+@@ -4371,6 +4371,10 @@ os._path_splitroot
+ Removes everything after the root on Win32.
+ [clinic start generated code]*/
+
++static int _PathCchSkipRoot_Initialized = 0;
++typedef HRESULT (__stdcall *PPathCchSkipRoot) (PCWSTR pszPath, PCWSTR *ppszRootEnd);
++static PPathCchSkipRoot _PathCchSkipRoot;
++
+ static PyObject *
+ os__path_splitroot_impl(PyObject *module, path_t *path)
+ /*[clinic end generated code: output=ab7f1a88b654581c input=dc93b1d3984cffb6]*/
+@@ -4380,6 +4384,19 @@ os__path_splitroot_impl(PyObject *module, path_t *path)
+ PyObject *result = NULL;
+ HRESULT ret;
+
++ if (_PathCchSkipRoot_Initialized == 0) {
++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL,
++ LOAD_LIBRARY_SEARCH_SYSTEM32);
++
++ if (pathapi) {
++ _PathCchSkipRoot = (PPathCchSkipRoot)GetProcAddress(pathapi, "PathCchSkipRoot");
++ } else {
++ _PathCchSkipRoot = NULL;
++ }
++
++ _PathCchSkipRoot_Initialized = 1;
++ }
++
+ buffer = (wchar_t*)PyMem_Malloc(sizeof(wchar_t) * (wcslen(path->wide) + 1));
+ if (!buffer) {
+ return NULL;
+@@ -4390,7 +4407,14 @@ os__path_splitroot_impl(PyObject *module, path_t *path)
+ }
+
+ Py_BEGIN_ALLOW_THREADS
+- ret = PathCchSkipRoot(buffer, &end);
++ if (_PathCchSkipRoot) {
++ ret = _PathCchSkipRoot(buffer, &end);
++ } else {
++ end = PathSkipRootW(buffer);
++ if (!end) {
++ ret = E_FAIL;
++ }
++ }
+ Py_END_ALLOW_THREADS
+ if (FAILED(ret)) {
+ result = Py_BuildValue("sO", "", path->object);
diff --git a/PC/getpathp.c b/PC/getpathp.c
-index 53da3a6d05..3d58bbfe70 100644
+index 53da3a6..3d58bbf 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -250,14 +250,43 @@ ismodule(wchar_t *filename, int update_filename)
@@ -92,7 +149,7 @@ index 53da3a6d05..3d58bbfe70 100644
return _PyStatus_OK();
}
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
-index 34269f0b75..812f6d9353 100644
+index d7d3cf0..6e9c090 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -136,8 +136,8 @@ WIN32 is still required for the locale module.
@@ -107,7 +164,7 @@ index 34269f0b75..812f6d9353 100644
/* We only set these values when building Python - we don't want to force
these values on extensions, as that will affect the prototypes and
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
-index d8e8d2d086..df2892b0de 100644
+index 2625d02..20e3d6e 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -106,7 +106,7 @@
@@ -119,6 +176,3 @@ index d8e8d2d086..df2892b0de 100644
</Link>
</ItemDefinitionGroup>
<ItemGroup>
---
-2.28.0.windows.1
-
diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake
index d19f5552c..3130bbfee 100644
--- a/ports/python3/portfile.cmake
+++ b/ports/python3/portfile.cmake
@@ -5,7 +5,7 @@ endif()
set(PYTHON_VERSION_MAJOR 3)
set(PYTHON_VERSION_MINOR 9)
-set(PYTHON_VERSION_PATCH 2)
+set(PYTHON_VERSION_PATCH 5)
set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH})
set(PATCHES
@@ -32,7 +32,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO python/cpython
REF v${PYTHON_VERSION}
- SHA512 f13c7e50d2c7c00e67b801b0bbb6ab6a8b6bd16c706b3bdd9d2186de3830f0043d0b95d7993d65a169adc9097738906c07727f0df49cd2fb2916bdf0456896b6
+ SHA512 6bef5174f133e7eb48ad54d14b07f77500ac2cdcfb397cac9f19ecaaf5334fbcc999f755719883c99c0d173b7b816a2def56537666c20e7b11cb783572fc6e00
HEAD_REF master
PATCHES ${PATCHES}
)
diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json
index 5f7675cd0..4694d7fed 100644
--- a/ports/python3/vcpkg.json
+++ b/ports/python3/vcpkg.json
@@ -1,7 +1,6 @@
{
"name": "python3",
- "version-string": "3.9.2",
- "port-version": 2,
+ "version-string": "3.9.5",
"description": "The Python programming language",
"homepage": "https://github.com/python/cpython",
"supports": "!(arm | uwp)",