Is the Python installation running from a different prefix than what was targetted when building?
()
| 375 | |
| 376 | |
| 377 | def _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 | |
| 389 | def _init_posix(vars): |
nothing calls this directly
no test coverage detected