Author: Armin Rigo <[email protected]>
Branch: py3.6
Changeset: r97327:5b42890d48c3
Date: 2019-08-29 08:07 +0000
http://bitbucket.org/pypy/pypy/changeset/5b42890d48c3/

Log:    Merged in lunixbochs/pypy-1/Ryan-Hileman/add-support-for-zipfile-
        stdlib-1562420744699 (pull request #648)

        add support for zipfile stdlib

diff --git a/pypy/module/sys/initpath.py b/pypy/module/sys/initpath.py
--- a/pypy/module/sys/initpath.py
+++ b/pypy/module/sys/initpath.py
@@ -148,10 +148,14 @@
     OSError.
     """
     from pypy.module.sys.version import CPYTHON_VERSION
-    dirname = '%d' % CPYTHON_VERSION[0]
-    lib_python = os.path.join(prefix, 'lib-python')
-    python_std_lib = os.path.join(lib_python, dirname)
-    _checkdir(python_std_lib)
+    lib_pyzip = os.path.join(prefix, 'python%d%d.zip' % CPYTHON_VERSION[:2])
+    if os.path.isfile(lib_pyzip):
+        python_std_lib = lib_pyzip
+    else:
+        dirname = '%d' % CPYTHON_VERSION[0]
+        lib_python = os.path.join(prefix, 'lib-python')
+        python_std_lib = os.path.join(lib_python, dirname)
+        _checkdir(python_std_lib)
 
     lib_pypy = os.path.join(prefix, 'lib_pypy')
     _checkdir(lib_pypy)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to