Files
MINGW-packages/mingw-w64-python/0028-python-config-output-Windows-paths-for-the-shell-var.patch
2026-01-07 22:17:09 +01:00

34 lines
1.1 KiB
Diff

From d2bca23dd225bbee7609b039e3e24fda15beb28f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
<alexey.pawlow@gmail.com>
Date: Thu, 17 Jun 2021 18:51:43 +0530
Subject: [PATCH 028/N] python-config: output Windows paths for the shell
variant
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
---
Misc/python-config.sh.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
index 555b0cb..706db08 100644
--- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in
@@ -27,6 +27,12 @@ installed_prefix ()
RESULT=$(readlink -f "$RESULT")
fi
fi
+ # Since we don't know where the output from this script will end up
+ # we keep all paths in Windows-land since MSYS2 can handle that
+ # while native tools can't handle paths in MSYS2-land.
+ if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ] ; then
+ RESULT=$(cd "$RESULT" && pwd -W)
+ fi
echo $RESULT
}