MCPcopy Index your code
hub / github.com/python/cpython / _installation_is_relocated

Function _installation_is_relocated

Lib/sysconfig/__init__.py:366–375  ·  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

364
365
366def _installation_is_relocated():
367 """Is the Python installation running from a different prefix than what was targetted when building?"""
368 if os.name != 'posix':
369 raise NotImplementedError('sysconfig._installation_is_relocated() is currently only supported on POSIX')
370
371 data = _get_sysconfigdata()
372 return (
373 data['prefix'] != getattr(sys, 'base_prefix', '')
374 or data['exec_prefix'] != getattr(sys, 'base_exec_prefix', '')
375 )
376
377
378def _init_posix(vars):

Callers

nothing calls this directly

Calls 1

_get_sysconfigdataFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…