diff options
-rw-r--r-- | docs/changelog.rst | 2 | ||||
-rw-r--r-- | src/virtualenv/util/zipapp.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/changelog.rst b/docs/changelog.rst index 6ab4ca0..669c359 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -25,7 +25,7 @@ Bugfixes - 20.0.6 by :user:`gaborbernat`. (`#1640 <https://github.com/pypa/virtualenv/issues/1640>`_) - Fix PyPy 2 builtin modules are imported from standard library, rather than from builtin - by :user:`gaborbernat`. (`#1652 <https://github.com/pypa/virtualenv/issues/1652>`_) - Fix creation of entry points when path contains spaces - by :user:`nsoranzo`. (`#1660 <https://github.com/pypa/virtualenv/issues/1660>`_) - +- Fix relative paths for the zipapp (for python ``3.7+``) - by :user:`gaborbernat`. (`#1666 <https://github.com/pypa/virtualenv/issues/1666>`_) v20.0.5 (2020-02-21) -------------------- diff --git a/src/virtualenv/util/zipapp.py b/src/virtualenv/util/zipapp.py index 698cc3e..36cee5e 100644 --- a/src/virtualenv/util/zipapp.py +++ b/src/virtualenv/util/zipapp.py @@ -29,7 +29,8 @@ def extract(full_path, dest): def _get_path_within_zip(full_path): - sub_file = str(full_path)[len(ROOT) + 1 :] + full_path = os.path.abspath(str(full_path)) + sub_file = full_path[len(ROOT) + 1 :] if IS_WIN: # paths are always UNIX separators, even on Windows, though __file__ still follows platform default sub_file = sub_file.replace(os.sep, "/") |