summarylogtreecommitdiffstats
path: root/0074-importlib-bootstrap-path-sep.patch
blob: 45ebba486683fa2a13c521635f5c0124f862f549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 3fa40ebd03d9cd5b0ab7341344f5d3c31647680f Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 17 Jun 2021 18:52:30 +0530
Subject: [PATCH 074/N] importlib bootstrap path sep
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Алексей <alexey.pawlow@gmail.com>
---
 Lib/importlib/_bootstrap_external.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index fe31f43..229d9aa 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -1674,6 +1674,10 @@ def _setup(_bootstrap_module):
     else:
         raise ImportError('importlib requires posix or nt')
 
+    if 'MSYSTEM' in os_module.environ:
+        path_separators = path_separators[::-1]
+        path_sep = path_separators[0]
+
     setattr(self_module, '_os', os_module)
     setattr(self_module, 'path_sep', path_sep)
     setattr(self_module, 'path_separators', ''.join(path_separators))
-- 
2.33.0