| 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/discovery/windows/ |
Upload File : |
from __future__ import absolute_import, unicode_literals
from ..py_info import PythonInfo
from ..py_spec import PythonSpec
from .pep514 import discover_pythons
class Pep514PythonInfo(PythonInfo):
""""""
def propose_interpreters(spec, cache_dir):
# see if PEP-514 entries are good
# start with higher python versions in an effort to use the latest version available
existing = list(discover_pythons())
existing.sort(key=lambda i: tuple(-1 if j is None else j for j in i[1:4]), reverse=True)
for name, major, minor, arch, exe, _ in existing:
# pre-filter
if name in ("PythonCore", "ContinuumAnalytics"):
name = "CPython"
registry_spec = PythonSpec(None, name, major, minor, None, arch, exe)
if registry_spec.satisfies(spec):
interpreter = Pep514PythonInfo.from_exe(exe, cache_dir, raise_on_error=False)
if interpreter is not None:
if interpreter.satisfies(spec, impl_must_match=True):
yield interpreter