| Server IP : 123.56.80.60 / Your IP : 216.73.216.78 Web Server : Apache/2.4.54 (Win32) OpenSSL/1.1.1s PHP/7.4.33 mod_fcgid/2.3.10-dev System : Windows NT iZhx3sob14hnz7Z 10.0 build 14393 (Windows Server 2016) i586 User : SYSTEM ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/python/Lib/site-packages/virtualenv/create/via_global_ref/builtin/pypy/ |
Upload File : |
from __future__ import absolute_import, unicode_literals
import abc
from six import add_metaclass
from virtualenv.create.describe import PosixSupports, Python3Supports, WindowsSupports
from virtualenv.create.via_global_ref.builtin.ref import PathRefToDest
from virtualenv.util.path import Path
from .common import PyPy
@add_metaclass(abc.ABCMeta)
class PyPy3(PyPy, Python3Supports):
@classmethod
def exe_stem(cls):
return "pypy3"
@property
def stdlib(self):
"""
PyPy3 seems to respect sysconfig only for the host python...
virtual environments purelib is instead lib/pythonx.y
"""
return self.dest / "lib" / "python{}".format(self.interpreter.version_release_str) / "site-packages"
@classmethod
def exe_names(cls, interpreter):
return super(PyPy3, cls).exe_names(interpreter) | {"pypy"}
class PyPy3Posix(PyPy3, PosixSupports):
"""PyPy 2 on POSIX"""
@classmethod
def _shared_libs(cls):
return ["libpypy3-c.so", "libpypy3-c.dylib"]
def to_lib(self, src):
return self.dest / "lib" / src.name
@classmethod
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)
class Pypy3Windows(PyPy3, WindowsSupports):
"""PyPy 2 on Windows"""
@property
def bin_dir(self):
"""PyPy3 needs to fallback to pypy definition"""
return self.dest / "Scripts"
@classmethod
def _shared_libs(cls):
return ["libpypy3-c.dll"]