Skip to content

Commit

Permalink
specifications: add build-details.json (PEP 739)
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <[email protected]>
  • Loading branch information
FFY00 committed Feb 5, 2025
1 parent d844cdc commit 43e7116
Show file tree
Hide file tree
Showing 9 changed files with 398 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
source/guides/github-actions-ci-cd-sample/* @webknjaz
source/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows.rst @webknjaz

# build-details.json
source/specifications/build-details/ @FFY00
source/specifications/specs/build-details-*.json @FFY00
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ sphinx-autobuild==2021.3.14
sphinx-inline-tabs==2023.4.21
sphinx-copybutton==0.5.2
sphinx-toolbox==3.5.0
sphinx-jsonschema==1.19.1
2 changes: 2 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"sphinx_inline_tabs",
"sphinx_copybutton",
"sphinx_toolbox.collapse",
"sphinx-jsonschema",
]

nitpicky = True
Expand Down Expand Up @@ -128,6 +129,7 @@

linkcheck_ignore = [
"http://localhost:\\d+",
"https://packaging.pypa.io/specifications/schemas/*",
"https://test.pypi.org/project/example-package-YOUR-USERNAME-HERE",
"https://pypi.org/manage/*",
"https://test.pypi.org/manage/*",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"schema_version": "1.0",
"base_prefix": "/usr",
"base_interpreter": "/usr/bin/python",
"platform": "linux-x86_64",
"language": {
"version": "3.14",
"version_info": {
"major": 3,
"minor": 14,
"micro": 0,
"releaselevel": "alpha",
"serial": 0
}
},
"implementation": {
"name": "cpython",
"version": {
"major": 3,
"minor": 14,
"micro": 0,
"releaselevel": "alpha",
"serial": 0
},
"hexversion": 51249312,
"cache_tag": "cpython-314",
"_multiarch": "x86_64-linux-gnu"
},
"abi": {
"flags": ["t", "d"],
"extension_suffix": ".cpython-314-x86_64-linux-gnu.so",
"stable_abi_suffix": ".abi3.so"
},
"suffixes": {
"source": [".py"],
"bytecode": [".pyc"],
"optimized_bytecode": [".pyc"],
"debug_bytecode": [".pyc"],
"extensions": [".cpython-314-x86_64-linux-gnu.so", ".abi3.so", ".so"]
},
"libpython": {
"dynamic": "/usr/lib/libpython3.14.so.1.0",
"dynamic_stableabi": "/usr/lib/libpython3.so",
"static": "/usr/lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a",
"link_extensions": true
},
"c_api": {
"headers": "/usr/include/python3.14",
"pkgconfig_path": "/usr/lib/pkgconfig"
}
}
52 changes: 52 additions & 0 deletions source/specifications/build-details/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.. _build-details:

======================
``build-details.json``
======================

.. toctree::
:hidden:

v1.0 <v1.0>


The ``build-details.json`` file is a standardized file format that provides
build-specfic information of a Python installation, such as its version,
extension ABI details, and other information that is specific to that particular
build of Python.

Starting from Python 3.14, a ``build-details.json`` file is installed in the
platform-independent standard library directory (``stdlib``, eg.
``/usr/lib/python3.14/build-details.json``).

Please refer to the :ref:`latest version <build-details-v1.0>` for its
specification.

..
Update to point to the latest version!
.. literalinclude:: examples/build-details-v1.0.json
:caption: Example
:language: json
:linenos:


Changelog
---------

..
Order in decreasing order.
v1.0
~~~~

.. list-table::

* - Specification
- :ref:`build-details-v1.0`

* - Schema
- https://packaging.pypa.io/specifications/schemas/build-details-v1.0.schema.json


- Initial version, introduced by :pep:`739`.
18 changes: 18 additions & 0 deletions source/specifications/build-details/v1.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.. _build-details-v1.0:

===========================
``build-details.json`` v1.0
===========================


Specification
-------------

.. jsonschema:: ../schemas/build-details-v1.0.schema.json
:lift_title: false


Example
-------

.. literalinclude:: examples/build-details-v1.0.json
1 change: 1 addition & 0 deletions source/specifications/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ and for proposing new ones, is documented on
section-installation-metadata
section-distribution-formats
section-package-indices
section-python-description-formats
Loading

0 comments on commit 43e7116

Please sign in to comment.