Files
MINGW-packages/mingw-w64-python/0147-fixup-sysconfig-make-_sysconfigdata.py-relocatable.patch
2023-11-08 23:40:56 +05:30

27 lines
969 B
Diff

From 9d633349ce916c151a8f077ea4ea8c0a1bcc7e75 Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen521kk@gmail.com>
Date: Tue, 7 Nov 2023 22:44:38 +0530
Subject: [PATCH 147/N] fixup! sysconfig: make _sysconfigdata.py relocatable
Use `sys.base_prefix` for sysconfig relocation
Previously, we were using `sys.prefix` for relocation, which is
not right as it may change for virtualenvs. `sys.base_prefix` is
the right variable to use.
---
Lib/sysconfig.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 8035d2e..f359835 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -542,7 +542,7 @@ def _generate_posix_vars():
for key in keys_to_replace:
value = build_time_vars[key]
- build_time_vars[key] = value.replace(prefix, sys.prefix)
+ build_time_vars[key] = value.replace(prefix, sys.base_prefix)
"""
with open(destfile, 'w', encoding='utf8') as f: