diff options
| author | Bernát Gábor <bgabor8@bloomberg.net> | 2020-03-06 18:37:07 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-06 18:37:07 +0000 |
| commit | e0fa3f2a2e2b6302691ecffe17b08a5394dada7c (patch) | |
| tree | 31b4fd08463130acc43e6d66ae3543acb3c2b702 /src/virtualenv/create | |
| parent | ea0628b9856631b68e8576562fe23ca5c1af65b2 (diff) | |
| download | virtualenv-e0fa3f2a2e2b6302691ecffe17b08a5394dada7c.tar.gz | |
Support for Python 2 platform that store landmark in platstdlib (#1697)
Resolves #1694.
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
Diffstat (limited to 'src/virtualenv/create')
3 files changed, 5 insertions, 4 deletions
diff --git a/src/virtualenv/create/via_global_ref/builtin/cpython/cpython2.py b/src/virtualenv/create/via_global_ref/builtin/cpython/cpython2.py index a8c07d3..4e20f4a 100644 --- a/src/virtualenv/create/via_global_ref/builtin/cpython/cpython2.py +++ b/src/virtualenv/create/via_global_ref/builtin/cpython/cpython2.py @@ -68,7 +68,7 @@ class CPython2Posix(CPython2, CPythonPosix): yield src # landmark for exec_prefix name = "lib-dynload" - yield PathRefToDest(Path(interpreter.system_stdlib) / name, dest=cls.to_stdlib) + yield PathRefToDest(interpreter.stdlib_path(name), dest=cls.to_stdlib) class CPython2Windows(CPython2, CPythonWindows): diff --git a/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py b/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py index 4719f68..7c2cb93 100644 --- a/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py +++ b/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py @@ -33,7 +33,7 @@ class CPython2macOsFramework(CPython2, CPythonPosix): # landmark for exec_prefix name = "lib-dynload" - yield PathRefToDest(Path(interpreter.system_stdlib) / name, dest=cls.to_stdlib) + yield PathRefToDest(interpreter.stdlib_path(name), dest=cls.to_stdlib) # this must symlink to the host prefix Python marker = Path(interpreter.prefix) / "Python" diff --git a/src/virtualenv/create/via_global_ref/builtin/python2/python2.py b/src/virtualenv/create/via_global_ref/builtin/python2/python2.py index f9e410a..7c8acf3 100644 --- a/src/virtualenv/create/via_global_ref/builtin/python2/python2.py +++ b/src/virtualenv/create/via_global_ref/builtin/python2/python2.py @@ -57,8 +57,9 @@ class Python2(ViaGlobalRefVirtualenvBuiltin, Python2Supports): yield src # install files needed to run site.py for req in cls.modules(): - yield PathRefToDest(Path(interpreter.system_stdlib) / "{}.py".format(req), dest=cls.to_stdlib) - comp = Path(interpreter.system_stdlib) / "{}.pyc".format(req) + stdlib_path = interpreter.stdlib_path("{}.py".format(req)) + yield PathRefToDest(stdlib_path, dest=cls.to_stdlib) + comp = stdlib_path.parent / "{}.pyc".format(req) if comp.exists(): yield PathRefToDest(comp, dest=cls.to_stdlib) |
