def sources(cls, interpreter): for src in super(PyPy3Posix, cls).sources(interpreter): yield src host_lib = Path(interpreter.system_prefix) / "lib" if host_lib.exists() and host_lib.is_dir(): for path in host_lib.iterdir(): yield PathRefToDest(path, dest=cls.to_lib)
def dll_and_pyd(cls, interpreter): folders = [Path(interpreter.system_executable).parent] # May be missing on some Python hosts. # See https://github.com/pypa/virtualenv/issues/2368 dll_folder = Path(interpreter.system_prefix) / "DLLs" if dll_folder.is_dir(): folders.append(dll_folder) for folder in folders: for file in folder.iterdir(): if file.suffix in (".pyd", ".dll"): yield PathRefToDest(file, cls.to_bin)
def sources(cls, interpreter): for src in super(PyPy3Posix, cls).sources(interpreter): yield src # 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 # (on PyPy3.8+ it will, like on CPython, hold the stdlib). host_lib = Path(interpreter.system_prefix) / "lib" stdlib = Path(interpreter.system_stdlib) if host_lib.exists() and host_lib.is_dir(): for path in host_lib.iterdir(): if stdlib == path: # For PyPy3.8+ the stdlib lives in lib/pypy3.8 # We need to avoid creating a symlink to it since that # will defeat the purpose of a virtualenv continue yield PathRefToDest(path, dest=cls.to_lib)