diff --git a/src/virtualenv/create/via_global_ref/builtin/pypy/pypy3.py b/src/virtualenv/create/via_global_ref/builtin/pypy/pypy3.py index f1726ec96..cc72c1459 100644 --- a/src/virtualenv/create/via_global_ref/builtin/pypy/pypy3.py +++ b/src/virtualenv/create/via_global_ref/builtin/pypy/pypy3.py @@ -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": + 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