build-details.json
¶
build-details.json
文件是一种标准化的文件格式,提供 Python 安装的特定于构建的信息,例如其版本、扩展 ABI 详细信息以及特定于该 Python 构建的其他信息。
从 Python 3.14 开始,build-details.json
文件安装在平台无关的标准库目录 (stdlib
,例如 /usr/lib/python3.14/build-details.json
) 中。
请参阅最新版本以了解其规范。
示例¶
1{
2 "schema_version": "1.0",
3 "base_prefix": "/usr",
4 "base_interpreter": "/usr/bin/python",
5 "platform": "linux-x86_64",
6 "language": {
7 "version": "3.14",
8 "version_info": {
9 "major": 3,
10 "minor": 14,
11 "micro": 0,
12 "releaselevel": "alpha",
13 "serial": 0
14 }
15 },
16 "implementation": {
17 "name": "cpython",
18 "version": {
19 "major": 3,
20 "minor": 14,
21 "micro": 0,
22 "releaselevel": "alpha",
23 "serial": 0
24 },
25 "hexversion": 51249312,
26 "cache_tag": "cpython-314",
27 "_multiarch": "x86_64-linux-gnu"
28 },
29 "abi": {
30 "flags": ["t", "d"],
31 "extension_suffix": ".cpython-314-x86_64-linux-gnu.so",
32 "stable_abi_suffix": ".abi3.so"
33 },
34 "suffixes": {
35 "source": [".py"],
36 "bytecode": [".pyc"],
37 "optimized_bytecode": [".pyc"],
38 "debug_bytecode": [".pyc"],
39 "extensions": [".cpython-314-x86_64-linux-gnu.so", ".abi3.so", ".so"]
40 },
41 "libpython": {
42 "dynamic": "/usr/lib/libpython3.14.so.1.0",
43 "dynamic_stableabi": "/usr/lib/libpython3.so",
44 "static": "/usr/lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a",
45 "link_extensions": true
46 },
47 "c_api": {
48 "headers": "/usr/include/python3.14",
49 "pkgconfig_path": "/usr/lib/pkgconfig"
50 }
51}
更新日志¶
v1.0¶
规范 |
|
Schema |
https://packaging.pythonlang.cn/en/latest/specifications/schemas/build-details-v1.0.schema.json |
初始版本,由PEP 739引入。