Files
MINGW-packages/mingw-w64-python3/0490-MINGW-customize-site.patch
Christoph Reiter 9757046077 python3: Update to 3.6.1 (#2587)
* python3: Update to 3.6.1

The patches starting with 16 are new to fix the build.
Some no longer relevant patches were dropped, the rest is just refreshed.

* Bump pkgrel of all packages containing Python 3 bytecode/extensions.

The package list was generated using:
    pkgfile.exe -R mingw64 -r "cpython.*\\.(py[cod]|dll)"

* lensfun: Add cmake to makedepends

* numpy: Don't hardcode the Python version

* blender: rebuild for new Python

* boost: Don't hardcode Python versions; rebuild

* pillow: Don't hardcode Python version; rebuild

* python-dateutil: Don't hardcode Python versions

* sip: Don't hardcode Python versions

* pyqt4: Don't hardcode Python versions; rebuild

* pyqt5: Don't hardcode Python versions; rebuild

* opencv: Update Python3 version in patch
2017-06-15 17:40:51 +03:00

31 lines
1023 B
Diff

--- Python-3.6.1/Lib/site.py.orig 2017-03-21 07:32:38.000000000 +0100
+++ Python-3.6.1/Lib/site.py 2017-06-13 18:43:05.740187100 +0200
@@ -268,6 +268,12 @@
USER_SITE = get_path('purelib', 'osx_framework_user')
return USER_SITE
+ if sys.platform == 'win32':
+ from sysconfig import _POSIX_BUILD
+ if _POSIX_BUILD:
+ USER_SITE = get_path('purelib', 'posix_user')
+ return USER_SITE
+
USER_SITE = get_path('purelib', '%s_user' % os.name)
return USER_SITE
@@ -298,12 +304,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"))