mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
* test: add example for free-threaded Python support Generated-by: aiautocommit * test(snapshot): update python-freethreaded build plan snapshot Generated-by: aiautocommit
11 lines
337 B
Python
11 lines
337 B
Python
import platform
|
|
import sys
|
|
import sysconfig
|
|
|
|
# Py_GIL_DISABLED == 1 means the binary was built without the GIL (free-threaded build)
|
|
is_freethreaded = sysconfig.get_config_var("Py_GIL_DISABLED") == 1
|
|
|
|
print(f"Python {sys.version.split()[0]}")
|
|
print(f"Free-threaded build: {is_freethreaded}")
|
|
print(f"Architecture: {platform.machine()}")
|