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

Function _installation_is_relocated

Lib/sysconfig/__init__.py:377–386  ·  view source on GitHub ↗

Is the Python installation running from a different prefix than what was targetted when building?

()

Source from the content-addressed store, hash-verified

375
376
377def _installation_is_relocated():
378 """Is the Python installation running from a different prefix than what was targetted when building?"""
379 if os.name != 'posix':
380 raise NotImplementedError('sysconfig._installation_is_relocated() is currently only supported on POSIX')
381
382 data = _get_sysconfigdata()
383 return (
384 data['prefix'] != getattr(sys, 'base_prefix', '')
385 or data['exec_prefix'] != getattr(sys, 'base_exec_prefix', '')
386 )
387
388
389def _init_posix(vars):

Callers

nothing calls this directly

Calls 2

_get_sysconfigdataFunction · 0.85
getattrFunction · 0.85

Tested by

no test coverage detected