Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid symlinking the contents of /usr into PyPy3 virtualenvs #2310

Merged
merged 4 commits into from Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog/2310.bugfix.rst
@@ -0,0 +1 @@
Avoid symlinking the contents of ``/usr`` into PyPy3.8+ virtualenvs - by :user:`stefanor`.
5 changes: 5 additions & 0 deletions src/virtualenv/create/via_global_ref/builtin/pypy/pypy3.py
Expand Up @@ -42,6 +42,11 @@ def to_lib(self, src):
def sources(cls, interpreter):
for src in super(PyPy3Posix, cls).sources(interpreter):
yield src
# PyPy >= 3.8 supports a standard prefix installation, where older
# versions always used a portable/developent style installation.
# If this is a standard prefix installation, skip the below:
if interpreter.system_prefix == "/usr":
stefanor marked this conversation as resolved.
Show resolved Hide resolved
return
# Also copy/symlink anything under prefix/lib, which, for "portable"
# PyPy builds, includes the tk,tcl runtime and a number of shared
# objects. In distro-specific builds or on conda this should be empty
Expand Down