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

Function is_python_build

Lib/sysconfig/__init__.py:222–237  ·  view source on GitHub ↗
(check_home=None)

Source from the content-addressed store, hash-verified

220 _PROJECT_BASE = _safe_realpath(os.environ["_PYTHON_PROJECT_BASE"])
221
222def is_python_build(check_home=None):
223 if check_home is not None:
224 import warnings
225 warnings.warn(
226 (
227 'The check_home argument of sysconfig.is_python_build is '
228 'deprecated and its value is ignored. '
229 'It will be removed in Python 3.15.'
230 ),
231 DeprecationWarning,
232 stacklevel=2,
233 )
234 for fn in ("Setup", "Setup.local"):
235 if os.path.isfile(os.path.join(_PROJECT_BASE, "Modules", fn)):
236 return True
237 return False
238
239_PYTHON_BUILD = is_python_build()
240

Callers 2

__init__.pyFile · 0.85

Calls 3

warnMethod · 0.45
isfileMethod · 0.45
joinMethod · 0.45

Tested by 1