MINGW-packages/mingw-w64-python3.13/0095-pathconfig-normpath-sys.path-0.patch
Christoph Reiter 04c9ed3700 python3.13: Add 3.13.7
* add libb2 as dep
* remove "-Wl,--large-address-aware", default now via makepkg
* remove 2to3 logic, no longer in Python
2025-09-08 22:02:30 +02:00

25 lines
871 B
Diff

From 9870a2a3ca005e46be9dd09962cbea9969b9aa10 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Fri, 28 Jul 2023 20:14:38 +0200
Subject: [PATCH 095/N] pathconfig: normpath sys.path[0]
this gets added as first element in sys.path.
use normpath to make sure it uses the right path separator
---
Python/pathconfig.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index 466a791..dc36dde 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -638,7 +638,7 @@ _PyPathConfig_ComputeSysPath0(const PyWideStringList *argv, PyObject **path0_p)
}
#endif /* All others */
- PyObject *path0_obj = PyUnicode_FromWideChar(path0, n);
+ PyObject *path0_obj = PyUnicode_FromWideChar(_Py_normpath(path0, -1), n);
if (path0_obj == NULL) {
return -1;
}