MCPcopy Index your code
hub / github.com/RustPython/RustPython / _platform_specific

Method _platform_specific

Lib/test/support/__init__.py:1624–1649  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1622
1623 if sys.platform == "win32":
1624 def _platform_specific(self):
1625 import glob
1626 import _winapi
1627
1628 if os.path.lexists(self.real) and not os.path.exists(self.real):
1629 # App symlink appears to not exist, but we want the
1630 # real executable here anyway
1631 self.real = _winapi.GetModuleFileName(0)
1632
1633 dll = _winapi.GetModuleFileName(sys.dllhandle)
1634 src_dir = os.path.dirname(dll)
1635 dest_dir = os.path.dirname(self.link)
1636 self._also_link.append((
1637 dll,
1638 os.path.join(dest_dir, os.path.basename(dll))
1639 ))
1640 for runtime in glob.glob(os.path.join(glob.escape(src_dir), "vcruntime*.dll")):
1641 self._also_link.append((
1642 runtime,
1643 os.path.join(dest_dir, os.path.basename(runtime))
1644 ))
1645
1646 self._env = {k.upper(): os.getenv(k) for k in os.environ}
1647 self._env["PYTHONHOME"] = os.path.dirname(self.real)
1648 if sysconfig.is_python_build():
1649 self._env["PYTHONPATH"] = STDLIB_DIR
1650 else:
1651 def _platform_specific(self):
1652 pass

Callers 1

__init__Method · 0.95

Calls 8

basenameMethod · 0.80
escapeMethod · 0.80
lexistsMethod · 0.45
existsMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45
globMethod · 0.45
upperMethod · 0.45

Tested by

no test coverage detected