From f20180245efbb70e934609ee0dea977b582a9c4b Mon Sep 17 00:00:00 2001 From: Itamar Oren Date: Tue, 12 Dec 2023 09:07:37 -0800 Subject: [PATCH 1/3] Don't use relative include path in getpath.c --- Modules/getpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/getpath.c b/Modules/getpath.c index 6c1078b8914522..391aef0a2af8ac 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -22,7 +22,7 @@ #endif /* Reference the precompiled getpath.py */ -#include "../Python/frozen_modules/getpath.h" +#include "Python/frozen_modules/getpath.h" #if (!defined(PREFIX) || !defined(EXEC_PREFIX) \ || !defined(VERSION) || !defined(VPATH) \ From 8100efb64c8fe82403f2266909058192369edc2a Mon Sep 17 00:00:00 2001 From: Itamar Ostricher Date: Thu, 14 Dec 2023 21:58:30 -0800 Subject: [PATCH 2/3] Keep relative include path on Windows --- Modules/getpath.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/getpath.c b/Modules/getpath.c index 391aef0a2af8ac..6bf2c062452e02 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -22,7 +22,11 @@ #endif /* Reference the precompiled getpath.py */ +#ifdef MS_WINDOWS +#include "../Python/frozen_modules/getpath.h" +#else #include "Python/frozen_modules/getpath.h" +#endif #if (!defined(PREFIX) || !defined(EXEC_PREFIX) \ || !defined(VERSION) || !defined(VPATH) \ From 1d5d68f981afeb0643649cafb4476a841448d162 Mon Sep 17 00:00:00 2001 From: Itamar Ostricher Date: Sat, 16 Dec 2023 19:22:38 -0800 Subject: [PATCH 3/3] Use abs include path on Windows too --- Modules/getpath.c | 4 ---- PCbuild/pythoncore.vcxproj | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Modules/getpath.c b/Modules/getpath.c index 6bf2c062452e02..391aef0a2af8ac 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -22,11 +22,7 @@ #endif /* Reference the precompiled getpath.py */ -#ifdef MS_WINDOWS -#include "../Python/frozen_modules/getpath.h" -#else #include "Python/frozen_modules/getpath.h" -#endif #if (!defined(PREFIX) || !defined(EXEC_PREFIX) \ || !defined(VERSION) || !defined(VPATH) \ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 278f1f5622543c..41dff0ee2bc82d 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -120,6 +120,7 @@ PLATLIBDIR="DLLs"; %(PreprocessorDefinitions) + $(PySourcePath);%(AdditionalIncludeDirectories)