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

Function _unpack_hexversion

PC/layout/support/constants.py:15–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def _unpack_hexversion():
16 try:
17 hexversion = int(os.getenv("PYTHON_HEXVERSION"), 16)
18 return struct.pack(">i", hexversion)
19 except (TypeError, ValueError):
20 pass
21 if os.getenv("PYTHONINCLUDE"):
22 try:
23 return _read_patchlevel_version(pathlib.Path(os.getenv("PYTHONINCLUDE")))
24 except OSError:
25 pass
26 return struct.pack(">i", sys.hexversion)
27
28
29def _get_suffix(field4):

Callers 1

constants.pyFile · 0.85

Calls 2

_read_patchlevel_versionFunction · 0.85
packMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…