Files
MINGW-packages/mingw-w64-python3/0490-MINGW-customize-site.patch
Алексей edc01d04d6 Update python to 3.7.0 (#4047)
* Initial python-3.7 port

* python3: Add setup.config.in to remove before patching

* python3: Implement setenv for mingw. Fix building with NT threads. Build
with unicode

* Fix typos

* Fix linking core modules

* Mingw build have exec_prefix

* Remove deprecated patch

* Fix building python and modules. Failing to build readline module and
install not working yet

* More getpath changes and more aggressive path separator conversion

* Fix readline module compilation and linking errors

* python3: By default building with posix threads, NT threads are broken.
Some patches optimization. First buildable commit

* Py_DecodeLocale handle char, not wchar

* Fix building multiprocessing module with posix threads
2018-07-06 09:57:52 +03:00

29 lines
1.0 KiB
Diff

diff -Naur Python-3.7.0-orig/Lib/site.py Python-3.7.0/Lib/site.py
--- Python-3.7.0-orig/Lib/site.py 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/Lib/site.py 2018-06-30 11:16:45.795074400 +0300
@@ -265,7 +265,8 @@
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:
@@ -328,12 +329,13 @@
if prefixes is None:
prefixes = PREFIXES
+ from sysconfig import _POSIX_BUILD
for prefix in prefixes:
if not prefix or prefix in seen:
continue
seen.add(prefix)
- if os.sep == '/':
+ if _POSIX_BUILD:
sitepackages.append(os.path.join(prefix, "lib",
"python%d.%d" % sys.version_info[:2],
"site-packages"))