diff options
author | atomlong | 2021-08-28 11:19:04 +0800 |
---|---|---|
committer | atomlong | 2021-08-28 13:15:13 +0800 |
commit | 89a67c05174951d172252b1db96ff93cc4ec4bcd (patch) | |
tree | d8c39fa79b201cf9aea28c51e7446a252ed8fee4 /0033-MINGW-customize-site.patch | |
parent | cf8d8d8771493a2aa8370ed323d06dc733a84181 (diff) | |
download | aur-89a67c05174951d172252b1db96ff93cc4ec4bcd.tar.gz |
Update to 3.9.6
Diffstat (limited to '0033-MINGW-customize-site.patch')
-rw-r--r-- | 0033-MINGW-customize-site.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/0033-MINGW-customize-site.patch b/0033-MINGW-customize-site.patch new file mode 100644 index 000000000000..bf0282aaabda --- /dev/null +++ b/0033-MINGW-customize-site.patch @@ -0,0 +1,59 @@ +From 8baa74769c98ae5a10f2766806f282d8a5980cf3 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:42 +0530 +Subject: [PATCH 033/N] MINGW customize site +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> +--- + Lib/site.py | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/Lib/site.py b/Lib/site.py +index 9e617af..b344f03 100644 +--- a/Lib/site.py ++++ b/Lib/site.py +@@ -251,7 +251,8 @@ def _getuserbase(): + def joinuser(*args): + return os.path.expanduser(os.path.join(*args)) + +- if os.name == "nt": ++ from sysconfig import _POSIX_BUILD ++ if os.name == "nt" and not _POSIX_BUILD: + base = os.environ.get("APPDATA") or "~" + return joinuser(base, "Python") + +@@ -266,7 +267,8 @@ def _getuserbase(): + def _get_path(userbase): + version = sys.version_info + +- if os.name == 'nt': ++ from sysconfig import _POSIX_BUILD ++ if sys.platform == 'win32' and not _POSIX_BUILD: + return f'{userbase}\\Python{version[0]}{version[1]}\\site-packages' + + if sys.platform == 'darwin' and sys._framework: +@@ -329,6 +331,7 @@ def getsitepackages(prefixes=None): + if prefixes is None: + prefixes = PREFIXES + ++ from sysconfig import _POSIX_BUILD + for prefix in prefixes: + if not prefix or prefix in seen: + continue +@@ -338,7 +341,7 @@ def getsitepackages(prefixes=None): + if sys.platlibdir != "lib": + libdirs.append("lib") + +- if os.sep == '/': ++ if _POSIX_BUILD: + for libdir in libdirs: + path = os.path.join(prefix, libdir, + "python%d.%d" % sys.version_info[:2], +-- +2.32.0 + |