Skip to content

Commit ee8c2f3

Browse files
authored
Merge pull request #1807 from FFY00/add-pep739
specifications: add build-details.json (PEP 739)
2 parents 4c1831e + 7b72c11 commit ee8c2f3

File tree

9 files changed

+402
-0
lines changed

9 files changed

+402
-0
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
source/guides/github-actions-ci-cd-sample/* @webknjaz
22
source/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows.rst @webknjaz
3+
4+
# build-details.json
5+
source/specifications/build-details/ @FFY00
6+
source/specifications/specs/build-details-*.json @FFY00

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ sphinx-autobuild==2021.3.14
44
sphinx-inline-tabs==2023.4.21
55
sphinx-copybutton==0.5.2
66
sphinx-toolbox==3.5.0
7+
sphinx-jsonschema==1.19.1

source/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"sphinx_inline_tabs",
2929
"sphinx_copybutton",
3030
"sphinx_toolbox.collapse",
31+
"sphinx-jsonschema",
3132
]
3233

3334
nitpicky = True
@@ -82,6 +83,10 @@
8283
# https://plausible.io/packaging.python.org
8384
html_js_files.extend(_metrics_js_files)
8485

86+
html_extra_path = [
87+
"specifications/schemas",
88+
]
89+
8590
# -- Options for HTML help output ------------------------------------------------------
8691
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-help-output
8792

@@ -128,6 +133,7 @@
128133

129134
linkcheck_ignore = [
130135
"http://localhost:\\d+",
136+
"https://packaging.python.org/en/latest/specifications/schemas/.*",
131137
"https://test.pypi.org/project/example-package-YOUR-USERNAME-HERE",
132138
"https://pypi.org/manage/*",
133139
"https://test.pypi.org/manage/*",
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.. _build-details:
2+
3+
==========================
4+
:file:`build-details.json`
5+
==========================
6+
7+
.. toctree::
8+
:hidden:
9+
10+
v1.0 <v1.0>
11+
12+
13+
The ``build-details.json`` file is a standardized file format that provides
14+
build-specfic information of a Python installation, such as its version,
15+
extension ABI details, and other information that is specific to that particular
16+
build of Python.
17+
18+
Starting from Python 3.14, a ``build-details.json`` file is installed in the
19+
platform-independent standard library directory (``stdlib``, e.g.
20+
``/usr/lib/python3.14/build-details.json``).
21+
22+
Please refer to the :ref:`latest version <build-details-v1.0>` for its
23+
specification.
24+
25+
..
26+
Update to point to the latest version!
27+
28+
.. literalinclude:: examples/build-details-v1.0.json
29+
:caption: Example
30+
:language: json
31+
:linenos:
32+
33+
34+
Changelog
35+
---------
36+
37+
..
38+
Order in decreasing order.
39+
40+
v1.0
41+
~~~~
42+
43+
.. list-table::
44+
45+
* - Specification
46+
- :ref:`build-details-v1.0`
47+
48+
* - Schema
49+
- :download:`https://packaging.python.org/en/latest/specifications/schemas/build-details-v1.0.schema.json <../schemas/build-details-v1.0.schema.json>`
50+
51+
52+
- Initial version, introduced by :pep:`739`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. _build-details-v1.0:
2+
3+
===========================
4+
``build-details.json`` v1.0
5+
===========================
6+
7+
8+
Specification
9+
-------------
10+
11+
.. jsonschema:: ../schemas/build-details-v1.0.schema.json
12+
:lift_title: false
13+
14+
15+
Example
16+
-------
17+
18+
.. literalinclude:: examples/build-details-v1.0.json

source/specifications/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ and for proposing new ones, is documented on
1515
section-installation-metadata
1616
section-distribution-formats
1717
section-package-indices
18+
section-python-description-formats

0 commit comments

Comments
 (0)