From 7c206e44da6ac6e646135a8a78640c348dd93ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Mon, 20 Jan 2025 21:11:10 +0000 Subject: [PATCH 01/22] PEP 739: replace interpreter.path key with base_interpreter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 55 +++++++------------ peps/pep-0739/example.json | 4 +- .../python-build-info-v1.0.schema.json | 26 +++------ 3 files changed, 28 insertions(+), 57 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 9656f38ba15..c65456c8cee 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -115,6 +115,25 @@ below, which is rendered in an human-readable format here. * - Required - **True** +``base_interpreter`` +-------------------- + +.. list-table:: + :widths: 25 75 + + * - Type + - ``string`` + * - Description + - The path to the Python interprer of the base installation. + Either an absolute path, or a relative path to the path defined + in the ``base_prefix`` key. + * - Examples + - - ``/usr/bin/python`` + - ``bin/python`` + - etc. + * - Required + - **False** + ``base_prefix`` --------------- @@ -376,42 +395,6 @@ below, which is rendered in an human-readable format here. * - Required - **True** -``interpreter`` ---------------- - -.. list-table:: - :widths: 25 75 - - * - Type - - ``object`` - * - Description - - Object containing details Python interpreter. - - This section MUST be present if the Python installation provides - an interpreter binary, otherwise this section will be missing. - * - Required - - **False** - * - Additional properties - - **Not allowed** - -``interpreter.path`` -~~~~~~~~~~~~~~~~~~~~ - -.. list-table:: - :widths: 25 75 - - * - Type - - ``string`` - * - Description - - The path to the Python interprer. Either an absolute path, or a - relative path to the path defined in the ``base_prefix`` key. - * - Examples - - - ``/usr/bin/python`` - - ``bin/python`` - - etc. - * - Required - - **True** - ``abi`` ------- diff --git a/peps/pep-0739/example.json b/peps/pep-0739/example.json index f2147bc95f6..4e4292659be 100644 --- a/peps/pep-0739/example.json +++ b/peps/pep-0739/example.json @@ -1,5 +1,6 @@ { "schema_version": "1.0", + "base_interpreter": "/usr/bin/python", "base_prefix": "/usr", "platform": "linux-x86_64", "language": { @@ -25,9 +26,6 @@ "cache_tag": "cpython-314", "_multiarch": "x86_64-linux-gnu" }, - "interpreter": { - "path": "/usr/bin/python" - }, "abi": { "flags": ["t", "d"], "extension_suffix": ".cpython-314-x86_64-linux-gnu.so", diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 3e0cfd26373..14b130b9740 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -16,6 +16,14 @@ "description": "Schema version.\n\nThis is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetic compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and MUST be ``1.0``.\n\nFuture versions of this schema MUST use a higher version number. Future versions of this schema MUST NOT use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).", "const": "1.0" }, + "base_interpreter": { + "type": "string", + "description": "The path to the Python interprer of the base installation. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.", + "examples": [ + "/usr/bin/python", + "bin/python" + ] + }, "base_prefix": { "type": "string", "description": "Base prefix of the Python installation.\n\nEither an absolute path, or a relative path to directory where this file is contained.", @@ -137,24 +145,6 @@ } } }, - "interpreter": { - "type": "object", - "description": "Object containing details Python interpreter.\n\nThis section MUST be present if the Python installation provides an interpreter binary, otherwise this section will be missing.", - "required": [ - "path" - ], - "additionalProperties": false, - "properties": { - "path": { - "type": "string", - "description": "The path to the Python interprer. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.", - "examples": [ - "/usr/bin/python", - "bin/python" - ] - } - } - }, "abi": { "type": "object", "description": "Object containing details related to ABI.", From e3f3b8fba891cf79eaf46902339005b72ee183ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Mon, 20 Jan 2025 21:12:07 +0000 Subject: [PATCH 02/22] PEP 739: clarify libpython.dynamic_stableabi key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 6 ++++-- peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index c65456c8cee..3edadf89e43 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -551,8 +551,10 @@ below, which is rendered in an human-readable format here. defined in the ``base_prefix`` key. This field MUST be present if the Python installation provides a - dynamic ``libpython`` library, otherwise this entry will be - missing. + dynamic ``libpython`` library targetting the Stable ABI, + otherwise this entry will be missing. + + If this key is present ``dynamic`` MUST also be set. * - Examples - - ``/usr/lib/libpython3.so`` - ``lib/libpython3.so`` diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 14b130b9740..9142669b352 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -206,7 +206,7 @@ }, "dynamic_stableabi": { "type": "string", - "description": "The path to the dynamic ``libpython`` library for the stable ABI. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing.", + "description": "The path to the dynamic ``libpython`` library for the stable ABI. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the Python installation provides a dynamic ``libpython`` library targetting the Stable ABI, otherwise this entry will be missing.\n\nIf this key is present ``dynamic`` MUST also be set.", "examples": [ "/usr/lib/libpython3.so", "lib/libpython3.so" From 5a300eb83cae09bd248ead2768db42a1d9533ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Mon, 20 Jan 2025 21:13:20 +0000 Subject: [PATCH 03/22] PEP 739: rename libpython.link_to_libpython key to link_extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 4 ++-- peps/pep-0739/example.json | 2 +- peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 3edadf89e43..c0f6a70ea5e 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -585,8 +585,8 @@ below, which is rendered in an human-readable format here. * - Required - **False** -``libpython.link_to_libpython`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``libpython.link_extensions`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. list-table:: :widths: 25 75 diff --git a/peps/pep-0739/example.json b/peps/pep-0739/example.json index 4e4292659be..f89e247f816 100644 --- a/peps/pep-0739/example.json +++ b/peps/pep-0739/example.json @@ -42,7 +42,7 @@ "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_to_libpython": true + "link_extensions": true }, "c_api": { "headers": "/usr/include/python3.14", diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 9142669b352..8f8648b52c9 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -220,7 +220,7 @@ "lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a" ] }, - "link_to_libpython": { + "link_extensions": { "type": "boolean", "description": "Should extensions built against a dynamic ``libpython`` link to it?\n\nThis field MUST be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing." } From 12d67ac2c4a9e9636fe8a2af1f8eaa28ac019c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 21 Jan 2025 22:43:05 +0000 Subject: [PATCH 04/22] PEP 739: specify when base_interpreter must be present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 8f8648b52c9..749ed540abb 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -18,7 +18,7 @@ }, "base_interpreter": { "type": "string", - "description": "The path to the Python interprer of the base installation. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.", + "description": "The path to the Python interprer of the base installation. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the installation provides an interpreter executable.", "examples": [ "/usr/bin/python", "bin/python" From cf4dbe6ea2987f87b58df9b3979ecb598211a195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 21 Jan 2025 22:43:53 +0000 Subject: [PATCH 05/22] PEP 739: put base_prefix above base_interpreter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739/example.json | 2 +- peps/pep-0739/python-build-info-v1.0.schema.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/peps/pep-0739/example.json b/peps/pep-0739/example.json index f89e247f816..dd08b230fd6 100644 --- a/peps/pep-0739/example.json +++ b/peps/pep-0739/example.json @@ -1,7 +1,7 @@ { "schema_version": "1.0", - "base_interpreter": "/usr/bin/python", "base_prefix": "/usr", + "base_interpreter": "/usr/bin/python", "platform": "linux-x86_64", "language": { "version": "3.14", diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 749ed540abb..3b4c931530c 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -16,14 +16,6 @@ "description": "Schema version.\n\nThis is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetic compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and MUST be ``1.0``.\n\nFuture versions of this schema MUST use a higher version number. Future versions of this schema MUST NOT use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).", "const": "1.0" }, - "base_interpreter": { - "type": "string", - "description": "The path to the Python interprer of the base installation. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the installation provides an interpreter executable.", - "examples": [ - "/usr/bin/python", - "bin/python" - ] - }, "base_prefix": { "type": "string", "description": "Base prefix of the Python installation.\n\nEither an absolute path, or a relative path to directory where this file is contained.", @@ -32,6 +24,14 @@ "../.." ] }, + "base_interpreter": { + "type": "string", + "description": "The path to the Python interprer of the base installation. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the installation provides an interpreter executable.", + "examples": [ + "/usr/bin/python", + "bin/python" + ] + }, "platform": { "type": "string", "description": "System platform string.\n\nThis field SHOULD be equivalent to ``sysconfig.get_platform()``.", From 04b695f8e4d897fee261963789eb4879bfdaa3a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 21 Jan 2025 22:45:14 +0000 Subject: [PATCH 06/22] PEP 739: require base_prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739/python-build-info-v1.0.schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 3b4c931530c..112d82d4ae8 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -5,6 +5,7 @@ "title": "Static description file for the build details of Python installations", "required": [ "schema_version", + "base_prefix", "platform", "language", "implementation" From d8def249fbc4f8decd4fe471702a1f0ebd8aa5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 21 Jan 2025 22:46:51 +0000 Subject: [PATCH 07/22] PEP 739: make MUST and SHOULD keywords bold in json schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- .../python-build-info-v1.0.schema.json | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 112d82d4ae8..2944d0206ce 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -14,7 +14,7 @@ "properties": { "schema_version": { "type": "string", - "description": "Schema version.\n\nThis is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetic compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and MUST be ``1.0``.\n\nFuture versions of this schema MUST use a higher version number. Future versions of this schema MUST NOT use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).", + "description": "Schema version.\n\nThis is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetic compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and **MUST** be ``1.0``.\n\nFuture versions of this schema **MUST** use a higher version number. Future versions of this schema **MUST** NOT use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).", "const": "1.0" }, "base_prefix": { @@ -27,7 +27,7 @@ }, "base_interpreter": { "type": "string", - "description": "The path to the Python interprer of the base installation. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the installation provides an interpreter executable.", + "description": "The path to the Python interprer of the base installation. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the installation provides an interpreter executable.", "examples": [ "/usr/bin/python", "bin/python" @@ -35,7 +35,7 @@ }, "platform": { "type": "string", - "description": "System platform string.\n\nThis field SHOULD be equivalent to ``sysconfig.get_platform()``.", + "description": "System platform string.\n\nThis field **SHOULD** be equivalent to ``sysconfig.get_platform()``.", "examples": [ "linux-x86_64" ] @@ -50,12 +50,12 @@ "properties": { "version": { "type": "string", - "description": "String representation the Python language version — a version string consisting only of the *major* and *minor* components.\n\nThis field SHOULD be equivalent to ``sysconfig.get_python_version()``.", + "description": "String representation the Python language version — a version string consisting only of the *major* and *minor* components.\n\nThis field **SHOULD** be equivalent to ``sysconfig.get_python_version()``.", "examples": ["3.14"] }, "version_info": { "type": "object", - "description": "Object in the format of :py:data:`sys.version_info`.\n\nThis section SHOULD be equivalent to :py:data:`sys.version_info`.", + "description": "Object in the format of :py:data:`sys.version_info`.\n\nThis section **SHOULD** be equivalent to :py:data:`sys.version_info`.", "required": ["major", "minor", "micro", "releaselevel", "serial"], "additionalProperties": false, "examples": [ @@ -90,7 +90,7 @@ }, "implementation": { "type": "object", - "description": "Object containing details related to Python implementation.\n\nThis section SHOULD be equivalent to :py:data:`sys.implementation`. It follows specification defined in PEP 421, meaning that on top of the required keys, implementation-specific keys can also exist, but must be prefixed with an underscore.", + "description": "Object containing details related to Python implementation.\n\nThis section **SHOULD** be equivalent to :py:data:`sys.implementation`. It follows specification defined in PEP 421, meaning that on top of the required keys, implementation-specific keys can also exist, but must be prefixed with an underscore.", "required": [ "name", "version", @@ -157,7 +157,7 @@ "properties": { "flags": { "type": "array", - "description": "Build configuration flags, used to calculate the extension suffix.\n\nThe flags MUST be defined in the order they appear on the extension suffix.", + "description": "Build configuration flags, used to calculate the extension suffix.\n\nThe flags **MUST** be defined in the order they appear on the extension suffix.", "additionalProperties": true, "examples": [ ["t", "d"] @@ -165,14 +165,14 @@ }, "extension_suffix": { "type": "string", - "description": "Suffix used for extensions built against the current implementation version.\n\nThis field MUST be present if the Python implementation supports extensions, otherwise this entry will be missing.", + "description": "Suffix used for extensions built against the current implementation version.\n\nThis field **MUST** be present if the Python implementation supports extensions, otherwise this entry will be missing.", "examples": [ ".cpython-314-x86_64-linux-gnu.so" ] }, "stable_abi_suffix": { "type": "string", - "description": "Suffix used for extensions built against the stable ABI.\n\nThis field MUST be present if the Python implementation has a stable ABI extension suffix, otherwise this entry will be missing.", + "description": "Suffix used for extensions built against the stable ABI.\n\nThis field **MUST** be present if the Python implementation has a stable ABI extension suffix, otherwise this entry will be missing.", "examples": [ ".abi3.so" ] @@ -181,7 +181,7 @@ }, "suffixes": { "type": "object", - "description": "Valid module suffixes grouped by type.\n\nThis section SHOULD be equivalent to the ``importlib.machinery.*_SUFFIXES`` attributes, if the implementation provides such suffixes. However, if the Python implementation does not provide suffixes of the kind specified by any of the attributes, the equivalent sub-section is not required to be present. Additionally, if a Python implementation provides extension kinds other than the ones listed on ``importlib.machinery`` module, they MAY add a sub-section for them.", + "description": "Valid module suffixes grouped by type.\n\nThis section **SHOULD** be equivalent to the ``importlib.machinery.*_SUFFIXES`` attributes, if the implementation provides such suffixes. However, if the Python implementation does not provide suffixes of the kind specified by any of the attributes, the equivalent sub-section is not required to be present. Additionally, if a Python implementation provides extension kinds other than the ones listed on ``importlib.machinery`` module, they MAY add a sub-section for them.", "examples": [ { "source": [".py"], @@ -194,12 +194,12 @@ }, "libpython": { "type": "object", - "description": "Object containing details related to the ``libpython`` library.\n\nThis section MUST by present if Python installation provides a ``libpython`` library, otherwise this section will be missing.", + "description": "Object containing details related to the ``libpython`` library.\n\nThis section **MUST** by present if Python installation provides a ``libpython`` library, otherwise this section will be missing.", "additionalProperties": false, "properties": { "dynamic": { "type": "string", - "description": "The path to the dynamic ``libpython`` library. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing.", + "description": "The path to the dynamic ``libpython`` library. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing.", "examples": [ "/usr/lib/libpython3.14.so.1.0", "lib/libpython3.14.so.1.0" @@ -207,7 +207,7 @@ }, "dynamic_stableabi": { "type": "string", - "description": "The path to the dynamic ``libpython`` library for the stable ABI. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the Python installation provides a dynamic ``libpython`` library targetting the Stable ABI, otherwise this entry will be missing.\n\nIf this key is present ``dynamic`` MUST also be set.", + "description": "The path to the dynamic ``libpython`` library for the stable ABI. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library targetting the Stable ABI, otherwise this entry will be missing.\n\nIf this key is present ``dynamic`` **MUST** also be set.", "examples": [ "/usr/lib/libpython3.so", "lib/libpython3.so" @@ -215,7 +215,7 @@ }, "static": { "type": "string", - "description": "The path to the static ``libpython`` library. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the Python installation provides a static ``libpython`` library, otherwise this entry will be missing.", + "description": "The path to the static ``libpython`` library. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a static ``libpython`` library, otherwise this entry will be missing.", "examples": [ "/usr/lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a", "lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a" @@ -223,13 +223,13 @@ }, "link_extensions": { "type": "boolean", - "description": "Should extensions built against a dynamic ``libpython`` link to it?\n\nThis field MUST be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing." + "description": "Should extensions built against a dynamic ``libpython`` link to it?\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing." } } }, "c_api": { "type": "object", - "description": "Object containing details related to the Python C API, if available.\n\nThis section MUST be present if the Python implementation provides a C API, otherwise this section will be missing.", + "description": "Object containing details related to the Python C API, if available.\n\nThis section **MUST** be present if the Python implementation provides a C API, otherwise this section will be missing.", "required": [ "headers" ], @@ -245,7 +245,7 @@ }, "pkgconfig_path": { "type": "string", - "description": "The path to the pkg-config definition files. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field MUST be present if the Python implementation provides pkg-config definition files for the C API, otherwise this section will be missing.", + "description": "The path to the pkg-config definition files. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python implementation provides pkg-config definition files for the C API, otherwise this section will be missing.", "examples": [ "/usr/lib/pkgconfig", "lib/pkgconfig" From 19c90a92cf978f6736df2d0e95c2e518cea3f87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 21 Jan 2025 22:48:28 +0000 Subject: [PATCH 08/22] PEP 739: minor json schema description formating update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739/python-build-info-v1.0.schema.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 2944d0206ce..e8925a87711 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -27,7 +27,7 @@ }, "base_interpreter": { "type": "string", - "description": "The path to the Python interprer of the base installation. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the installation provides an interpreter executable.", + "description": "The path to the Python interprer of the base installation.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the installation provides an interpreter executable.", "examples": [ "/usr/bin/python", "bin/python" @@ -199,7 +199,7 @@ "properties": { "dynamic": { "type": "string", - "description": "The path to the dynamic ``libpython`` library. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing.", + "description": "The path to the dynamic ``libpython`` library.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing.", "examples": [ "/usr/lib/libpython3.14.so.1.0", "lib/libpython3.14.so.1.0" @@ -207,7 +207,7 @@ }, "dynamic_stableabi": { "type": "string", - "description": "The path to the dynamic ``libpython`` library for the stable ABI. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library targetting the Stable ABI, otherwise this entry will be missing.\n\nIf this key is present ``dynamic`` **MUST** also be set.", + "description": "The path to the dynamic ``libpython`` library for the stable ABI.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library targetting the Stable ABI, otherwise this entry will be missing.\n\nIf this key is present ``dynamic`` **MUST** also be set.", "examples": [ "/usr/lib/libpython3.so", "lib/libpython3.so" @@ -215,7 +215,7 @@ }, "static": { "type": "string", - "description": "The path to the static ``libpython`` library. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a static ``libpython`` library, otherwise this entry will be missing.", + "description": "The path to the static ``libpython`` library.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a static ``libpython`` library, otherwise this entry will be missing.", "examples": [ "/usr/lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a", "lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a" @@ -237,7 +237,7 @@ "properties": { "headers": { "type": "string", - "description": "The path to the C API headers. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.", + "description": "The path to the C API headers.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.", "examples": [ "/usr/include/python3.14", "include/python3.14" @@ -245,7 +245,7 @@ }, "pkgconfig_path": { "type": "string", - "description": "The path to the pkg-config definition files. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python implementation provides pkg-config definition files for the C API, otherwise this section will be missing.", + "description": "The path to the pkg-config definition files.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python implementation provides pkg-config definition files for the C API, otherwise this section will be missing.", "examples": [ "/usr/lib/pkgconfig", "lib/pkgconfig" From 3252ad1638911d1a6789ace9c337bc6444946b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 21 Jan 2025 22:55:00 +0000 Subject: [PATCH 09/22] PEP 739: update json schema name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index e8925a87711..e559d0609f2 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/python/peps/blob/main/peps/pep-0739/python-build-info-v1.0.schema.json", "type": "object", - "title": "Static description file for the build details of Python installations", + "title": "build-details.json — a static description file with build details of Python installations", "required": [ "schema_version", "base_prefix", From 40230039db39e958ae096b90b312d56ce19592f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 21 Jan 2025 22:55:21 +0000 Subject: [PATCH 10/22] PEP 739: specify when suffixes must be present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index e559d0609f2..0190450338b 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -181,7 +181,7 @@ }, "suffixes": { "type": "object", - "description": "Valid module suffixes grouped by type.\n\nThis section **SHOULD** be equivalent to the ``importlib.machinery.*_SUFFIXES`` attributes, if the implementation provides such suffixes. However, if the Python implementation does not provide suffixes of the kind specified by any of the attributes, the equivalent sub-section is not required to be present. Additionally, if a Python implementation provides extension kinds other than the ones listed on ``importlib.machinery`` module, they MAY add a sub-section for them.", + "description": "Valid module suffixes grouped by type.\n\nThis section **MUST** be present if the Python installation supports importing external files, and it **SHOULD** be equivalent to the ``importlib.machinery.*_SUFFIXES`` attributes. However, if the Python implementation does not provide suffixes of the kind specified by any of the attributes, the equivalent sub-section is not required to be present. Additionally, if a Python implementation provides extension kinds other than the ones listed on ``importlib.machinery`` module, they **MAY** add a sub-section for them.", "examples": [ { "source": [".py"], From 1c28424eae654495a8c8c93c362ab23902983388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 21 Jan 2025 23:31:35 +0000 Subject: [PATCH 11/22] PEP 739: major rewrite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 50 ++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index c0f6a70ea5e..377ad506fa2 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -1,5 +1,5 @@ PEP: 739 -Title: Static description file for build details of Python installations +Title: ``build-details.json`` 1.0 — a static description file for build details of Python installations Author: Filipe Laíns PEP-Delegate: Paul Moore Discussions-To: https://discuss.python.org/t/pep-739-static-description-file-for-build-details-of-python-installations/44572 @@ -13,16 +13,19 @@ Python-Version: 3.14 Abstract ======== -Introduce a standard format for a static description file with build details -of Python installations. +This PEP introduces ``build-details.json``, a static description file containing +build details of Python installations. + +It includes the definition of version 1.0 of the file format, and defines the +standard location for this file. Rationale ========= When introspecting a Python installation, running code is often undesirable or -impossible. Having a static description file makes various of Python build -details available without having to run the interpreter. +impossible. Having a static description file makes various build details of the +Python installation available without having to run the interpreter. This is helpful for use-cases such as cross-compilation, Python launchers, etc. @@ -30,31 +33,34 @@ This is helpful for use-cases such as cross-compilation, Python launchers, etc. Scope ===== -This PEP defines a format for the description file, and a standard location for -where to place it. - +``build-details.json`` is an installation-wide file, meaning that it **MUST** +only contain information that is constant across all environments of the Python +installation. -Location -======== +Information specific to a Python environment, such as the ``site-packages`` +path, is outside the scope for this file, and the PEP authors expect that a +static environment description file will be introduced via a future PEP. -When possible, Python installations should install the static description file -inside the standard library directory, with the name ``build-details.json`` -(Eg. ``/usr/lib/python3.14/build-details.json``). +Specification +============= -.. important:: - - Given that there may be technical challenges, Python implementations are not - required to provide the file if not feasable. In such scenarios, they may - choose to provide it in a different maner. +Starting from Python 3.14, a file named ``build-details.json`` following the +format specified in this PEP, or a future version, **MUST** be installed in the +platform-independent standard library directory (``stdlib``, eg. +``/usr/lib/python3.14/build-details.json``), **UNLESS** unfeasible due to +technical limitations. .. attention:: - Notwithstanding the standard location specified here, it does not prevent the - file from **additionally** being provided in another location, and with a - different name. In fact, the PEP authors expect future PEPs to define - additional locations to install this file, for better discoverability. + In addition to the standard location specified by this PEP, the + ``build-details.json`` file **MAY** also be installed into **additional** + locations, and under a different name. Notwithstanding, the file **SHOULD** + still be available at the standard location. + + In actuality, the PEP authors expect future PEPs to define additional + install locations with better discoverability. Format From c6ecc6649abbec5fa1e4a4d4ed2571ce71dcca25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Tue, 21 Jan 2025 23:32:35 +0000 Subject: [PATCH 12/22] PEP 739: update format description from json schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 156 +++++++++++++++++++++++++--------------------- 1 file changed, 84 insertions(+), 72 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 377ad506fa2..d3a6f847def 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -82,8 +82,8 @@ below, which is rendered in an human-readable format here. * - ``$id`` - https://github.com/python/peps/blob/main/peps/pep-0739/python-build-info-v1.0.schema.json * - Title - - Static description file for the build details of Python - installations + - build-details.json — a static description file with build + details of Python installations * - Type - ``object`` * - Additional properties @@ -106,12 +106,12 @@ below, which is rendered in an human-readable format here. may be arithmetic compared by intrepreting the version string as a decimal number. - For this specification version, this value is constant and MUST - be ``1.0``. + For this specification version, this value is constant and + **MUST** be ``1.0``. - Future versions of this schema MUST use a higher version number. - Future versions of this schema MUST NOT use the same **major** - version component as other schema version unless its + Future versions of this schema **MUST** use a higher version + number. Future versions of this schema **MUST** NOT use the same + **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, @@ -121,8 +121,8 @@ below, which is rendered in an human-readable format here. * - Required - **True** -``base_interpreter`` --------------------- +``base_prefix`` +--------------- .. list-table:: :widths: 25 75 @@ -130,18 +130,17 @@ below, which is rendered in an human-readable format here. * - Type - ``string`` * - Description - - The path to the Python interprer of the base installation. - Either an absolute path, or a relative path to the path defined - in the ``base_prefix`` key. + - Base prefix of the Python installation. + + Either an absolute path, or a relative path to directory where + this file is contained. * - Examples - - - ``/usr/bin/python`` - - ``bin/python`` - - etc. + - ``/usr``, ``../..``, etc. * - Required - - **False** + - **True** -``base_prefix`` ---------------- +``base_interpreter`` +-------------------- .. list-table:: :widths: 25 75 @@ -149,12 +148,17 @@ below, which is rendered in an human-readable format here. * - Type - ``string`` * - Description - - Base prefix of the Python installation. + - The path to the Python interprer of the base installation. - Either an absolute path, or a relative path to directory where - this file is contained. + Either an absolute path, or a relative path to the path defined + in the ``base_prefix`` key. + + This field **MUST** be present if the installation provides an + interpreter executable. * - Examples - - ``/usr``, ``../..``, etc. + - - ``/usr/bin/python`` + - ``bin/python`` + - etc. * - Required - **False** @@ -169,7 +173,8 @@ below, which is rendered in an human-readable format here. * - Description - System platform string. - This field SHOULD be equivalent to ``sysconfig.get_platform()``. + This field **SHOULD** be equivalent to + ``sysconfig.get_platform()``. * - Examples - - ``linux-x86_64`` - etc. @@ -207,7 +212,7 @@ below, which is rendered in an human-readable format here. - String representation the Python language version — a version string consisting only of the *major* and *minor* components. - This field SHOULD be equivalent to + This field **SHOULD** be equivalent to ``sysconfig.get_python_version()``. * - Examples - ``3.14``, etc. @@ -225,7 +230,7 @@ below, which is rendered in an human-readable format here. * - Description - Object in the format of :py:data:`sys.version_info`. - This section SHOULD be equivalent to + This section **SHOULD** be equivalent to :py:data:`sys.version_info`. * - Examples - - ``{'major': 3, 'minor': 14, 'micro': 1, 'releaselevel': 'final', 'serial': 0}`` @@ -301,7 +306,7 @@ below, which is rendered in an human-readable format here. * - Description - Object containing details related to Python implementation. - This section SHOULD be equivalent to + This section **SHOULD** be equivalent to :py:data:`sys.implementation`. It follows specification defined in PEP 421, meaning that on top of the required keys, implementation-specific keys can also exist, but must be @@ -428,7 +433,7 @@ below, which is rendered in an human-readable format here. - Build configuration flags, used to calculate the extension suffix. - The flags MUST be defined in the order they appear on the + The flags **MUST** be defined in the order they appear on the extension suffix. * - Examples - ``['t', 'd']``, etc. @@ -447,8 +452,8 @@ below, which is rendered in an human-readable format here. - Suffix used for extensions built against the current implementation version. - This field MUST be present if the Python implementation supports - extensions, otherwise this entry will be missing. + This field **MUST** be present if the Python implementation + supports extensions, otherwise this entry will be missing. * - Examples - - ``.cpython-314-x86_64-linux-gnu.so`` - etc. @@ -466,8 +471,8 @@ below, which is rendered in an human-readable format here. * - Description - Suffix used for extensions built against the stable ABI. - This field MUST be present if the Python implementation has a - stable ABI extension suffix, otherwise this entry will be + This field **MUST** be present if the Python implementation has + a stable ABI extension suffix, otherwise this entry will be missing. * - Examples - ``.abi3.so``, etc. @@ -485,15 +490,15 @@ below, which is rendered in an human-readable format here. * - Description - Valid module suffixes grouped by type. - This section SHOULD be equivalent to the - ``importlib.machinery.*_SUFFIXES`` attributes, if the - implementation provides such suffixes. However, if the Python - implementation does not provide suffixes of the kind specified - by any of the attributes, the equivalent sub-section is not - required to be present. Additionally, if a Python implementation - provides extension kinds other than the ones listed on - ``importlib.machinery`` module, they MAY add a sub-section for - them. + This section **MUST** be present if the Python installation + supports importing external files, and it **SHOULD** be + equivalent to the ``importlib.machinery.*_SUFFIXES`` attributes. + However, if the Python implementation does not provide suffixes + of the kind specified by any of the attributes, the equivalent + sub-section is not required to be present. Additionally, if a + Python implementation provides extension kinds other than the + ones listed on ``importlib.machinery`` module, they **MAY** add + a sub-section for them. * - Examples - - ``{'source': ['.py'], 'bytecode': ['.pyc'], 'optimized_bytecode': ['.pyc'], 'debug_bytecode': ['.pyc'], 'extensions': ['.cpython-313-x86_64-linux-gnu.so', '.abi3.so', '.so']}`` - etc. @@ -513,8 +518,8 @@ below, which is rendered in an human-readable format here. * - Description - Object containing details related to the ``libpython`` library. - This section MUST by present if Python installation provides a - ``libpython`` library, otherwise this section will be missing. + This section **MUST** by present if Python installation provides + a ``libpython`` library, otherwise this section will be missing. * - Required - **False** * - Additional properties @@ -529,13 +534,14 @@ below, which is rendered in an human-readable format here. * - Type - ``string`` * - Description - - The path to the dynamic ``libpython`` library. Either an - absolute path, or a relative path to the path defined in the - ``base_prefix`` key. + - The path to the dynamic ``libpython`` library. - This field MUST be present if the Python installation provides a - dynamic ``libpython`` library, otherwise this entry will be - missing. + Either an absolute path, or a relative path to the path defined + in the ``base_prefix`` key. + + This field **MUST** be present if the Python installation + provides a dynamic ``libpython`` library, otherwise this entry + will be missing. * - Examples - - ``/usr/lib/libpython3.14.so.1.0`` - ``lib/libpython3.14.so.1.0`` @@ -553,14 +559,16 @@ below, which is rendered in an human-readable format here. - ``string`` * - Description - The path to the dynamic ``libpython`` library for the stable - ABI. Either an absolute path, or a relative path to the path - defined in the ``base_prefix`` key. + ABI. - This field MUST be present if the Python installation provides a - dynamic ``libpython`` library targetting the Stable ABI, - otherwise this entry will be missing. + Either an absolute path, or a relative path to the path defined + in the ``base_prefix`` key. - If this key is present ``dynamic`` MUST also be set. + This field **MUST** be present if the Python installation + provides a dynamic ``libpython`` library targetting the Stable + ABI, otherwise this entry will be missing. + + If this key is present ``dynamic`` **MUST** also be set. * - Examples - - ``/usr/lib/libpython3.so`` - ``lib/libpython3.so`` @@ -577,13 +585,14 @@ below, which is rendered in an human-readable format here. * - Type - ``string`` * - Description - - The path to the static ``libpython`` library. Either an absolute - path, or a relative path to the path defined in the - ``base_prefix`` key. + - The path to the static ``libpython`` library. - This field MUST be present if the Python installation provides a - static ``libpython`` library, otherwise this entry will be - missing. + Either an absolute path, or a relative path to the path defined + in the ``base_prefix`` key. + + This field **MUST** be present if the Python installation + provides a static ``libpython`` library, otherwise this entry + will be missing. * - Examples - - ``/usr/lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a`` - ``lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a`` @@ -603,9 +612,9 @@ below, which is rendered in an human-readable format here. - Should extensions built against a dynamic ``libpython`` link to it? - This field MUST be present if the Python installation provides a - dynamic ``libpython`` library, otherwise this entry will be - missing. + This field **MUST** be present if the Python installation + provides a dynamic ``libpython`` library, otherwise this entry + will be missing. * - Required - **False** @@ -621,7 +630,7 @@ below, which is rendered in an human-readable format here. - Object containing details related to the Python C API, if available. - This section MUST be present if the Python implementation + This section **MUST** be present if the Python implementation provides a C API, otherwise this section will be missing. * - Required - **False** @@ -637,8 +646,10 @@ below, which is rendered in an human-readable format here. * - Type - ``string`` * - Description - - The path to the C API headers. Either an absolute path, or a - relative path to the path defined in the ``base_prefix`` key. + - The path to the C API headers. + + Either an absolute path, or a relative path to the path defined + in the ``base_prefix`` key. * - Examples - - ``/usr/include/python3.14`` - ``include/python3.14`` @@ -655,13 +666,14 @@ below, which is rendered in an human-readable format here. * - Type - ``string`` * - Description - - The path to the pkg-config definition files. Either an absolute - path, or a relative path to the path defined in the - ``base_prefix`` key. + - The path to the pkg-config definition files. + + Either an absolute path, or a relative path to the path defined + in the ``base_prefix`` key. - This field MUST be present if the Python implementation provides - pkg-config definition files for the C API, otherwise this - section will be missing. + This field **MUST** be present if the Python implementation + provides pkg-config definition files for the C API, otherwise + this section will be missing. * - Examples - - ``/usr/lib/pkgconfig`` - ``lib/pkgconfig`` From 84df41b27538c64451ffdcf401526316673dd135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:03:42 +0000 Subject: [PATCH 13/22] PEP 739: update rejected ideas text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index d3a6f847def..6dedaedd673 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -724,15 +724,27 @@ JSON Schema Rejected Ideas ============== -Having a larger scope ---------------------- +Including environment-specific data +----------------------------------- One of the main requests in the discussion of this PEP was the inclusion of other kind of information, such as the ``site-packages`` path. It is the opinion of the PEP authors that information regarding the Python environment should be -provided by a separate file, creating the a clear separation between the build -details, which should be immutable across any interpreter instance, and details -that can change, such as environment details. +provided by a separate file. + +Including environment-specific data in the config file means that it would be +environment-specific, so virtual environments would need their own config file. +This is problematic because virtual environments survive updates of the base +Python installation, creating the possibily for the static config file to be +outdated, and making its data unreliable, which defeats its purpose. + +The proposed solution, partially implemented in this PEP, is to have a +``build-details.json`` file, referent to the base Python installation, and a +``environment.json`` file, referent to the specific environment. + +With ``build-details.json`` being part of the Python distribution, when the base +Python installation gets updated, ``build-details.json`` does too, ensuring the +static description files are never outdated. Copyright From 9e3b489aad62a16f37bc38aad9928033d46dc687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:14:14 +0000 Subject: [PATCH 14/22] PEP 739: rename PEP to stay within the 80 characters limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 6dedaedd673..5b9602fb09a 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -1,5 +1,5 @@ PEP: 739 -Title: ``build-details.json`` 1.0 — a static description file for build details of Python installations +Title: ``build-details.json`` 1.0 — a static description file for Python build details Author: Filipe Laíns PEP-Delegate: Paul Moore Discussions-To: https://discuss.python.org/t/pep-739-static-description-file-for-build-details-of-python-installations/44572 From 38fa9904b849ff4affcc44633e434fa027e7e9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:22:50 +0000 Subject: [PATCH 15/22] Fix bad merge conflict resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 19 ------------------- peps/pep-0739/example.json | 1 - .../python-build-info-v1.0.schema.json | 8 -------- 3 files changed, 28 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 04c1fa34e2e..5b9602fb09a 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -121,25 +121,6 @@ below, which is rendered in an human-readable format here. * - Required - **True** -``base_interpreter`` --------------------- - -.. list-table:: - :widths: 25 75 - - * - Type - - ``string`` - * - Description - - The path to the Python interprer of the base installation. - Either an absolute path, or a relative path to the path defined - in the ``base_prefix`` key. - * - Examples - - - ``/usr/bin/python`` - - ``bin/python`` - - etc. - * - Required - - **False** - ``base_prefix`` --------------- diff --git a/peps/pep-0739/example.json b/peps/pep-0739/example.json index caf34f05c10..f89e247f816 100644 --- a/peps/pep-0739/example.json +++ b/peps/pep-0739/example.json @@ -2,7 +2,6 @@ "schema_version": "1.0", "base_interpreter": "/usr/bin/python", "base_prefix": "/usr", - "base_interpreter": "/usr/bin/python", "platform": "linux-x86_64", "language": { "version": "3.14", diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index cb1795fe441..0190450338b 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -17,14 +17,6 @@ "description": "Schema version.\n\nThis is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetic compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and **MUST** be ``1.0``.\n\nFuture versions of this schema **MUST** use a higher version number. Future versions of this schema **MUST** NOT use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).", "const": "1.0" }, - "base_interpreter": { - "type": "string", - "description": "The path to the Python interprer of the base installation. Either an absolute path, or a relative path to the path defined in the ``base_prefix`` key.", - "examples": [ - "/usr/bin/python", - "bin/python" - ] - }, "base_prefix": { "type": "string", "description": "Base prefix of the Python installation.\n\nEither an absolute path, or a relative path to directory where this file is contained.", From 633075dfcf54df67bfb62f8ddea0863e1056cfa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:25:35 +0000 Subject: [PATCH 16/22] Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 4 ++-- peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 5b9602fb09a..d1b1f5f40f4 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -103,8 +103,8 @@ below, which is rendered in an human-readable format here. This is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions - may be arithmetic compared by intrepreting the version string as - a decimal number. + may be arithmetically compared by intrepreting the version + string as a decimal number. For this specification version, this value is constant and **MUST** be ``1.0``. diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 0190450338b..567b1230945 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -14,7 +14,7 @@ "properties": { "schema_version": { "type": "string", - "description": "Schema version.\n\nThis is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetic compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and **MUST** be ``1.0``.\n\nFuture versions of this schema **MUST** use a higher version number. Future versions of this schema **MUST** NOT use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).", + "description": "Schema version.\n\nThis is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetically compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and **MUST** be ``1.0``.\n\nFuture versions of this schema **MUST** use a higher version number. Future versions of this schema **MUST** NOT use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).", "const": "1.0" }, "base_prefix": { From 684c8c0e1642c2b4a5feff099cae00628bb0348b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:26:03 +0000 Subject: [PATCH 17/22] Fix MUST NOT bold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 2 +- peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index d1b1f5f40f4..ad0d62b702a 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -110,7 +110,7 @@ below, which is rendered in an human-readable format here. **MUST** be ``1.0``. Future versions of this schema **MUST** use a higher version - number. Future versions of this schema **MUST** NOT use the same + number. Future versions of this schema **MUST NOT** use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 567b1230945..b12436f2d5f 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -14,7 +14,7 @@ "properties": { "schema_version": { "type": "string", - "description": "Schema version.\n\nThis is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetically compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and **MUST** be ``1.0``.\n\nFuture versions of this schema **MUST** use a higher version number. Future versions of this schema **MUST** NOT use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).", + "description": "Schema version.\n\nThis is a string following the format ``.``, where ```` and ```` are unpaded numbers and represent the **major** and **minor** components of the version. Versions may be arithmetically compared by intrepreting the version string as a decimal number.\n\nFor this specification version, this value is constant and **MUST** be ``1.0``.\n\nFuture versions of this schema **MUST** use a higher version number. Future versions of this schema **MUST NOT** use the same **major** version component as other schema version unless its specification is deemed backwards-compatible with them — it can't change, or extend, any parts of the current specification in such a way as the semantics of the interpreted data differ, or that data valid under the new specification is invalid under the older specification, with the exception of additional properties (errors caused by ``additionalProperties``).", "const": "1.0" }, "base_prefix": { From 4b39d468ed9c4b6df05c696f653e8451d3edfdf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:37:17 +0000 Subject: [PATCH 18/22] Fix language description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 3 --- peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index ad0d62b702a..6616a33834f 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -192,9 +192,6 @@ below, which is rendered in an human-readable format here. * - Description - Object containing details related to the Python language specification. - - In addition to the required keys, implementations may choose to - include extra keys with implementation-specific details. * - Required - **True** * - Additional properties diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index b12436f2d5f..73285bf7bc8 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -42,7 +42,7 @@ }, "language": { "type": "object", - "description": "Object containing details related to the Python language specification.\n\nIn addition to the required keys, implementations may choose to include extra keys with implementation-specific details.", + "description": "Object containing details related to the Python language specification.", "required": [ "version" ], From 92afa06185ed56f51d97de942e2501f63202ae6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:37:31 +0000 Subject: [PATCH 19/22] Simplify suffixes description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 10 ++++------ peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 6616a33834f..84be342c3bb 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -490,12 +490,10 @@ below, which is rendered in an human-readable format here. This section **MUST** be present if the Python installation supports importing external files, and it **SHOULD** be equivalent to the ``importlib.machinery.*_SUFFIXES`` attributes. - However, if the Python implementation does not provide suffixes - of the kind specified by any of the attributes, the equivalent - sub-section is not required to be present. Additionally, if a - Python implementation provides extension kinds other than the - ones listed on ``importlib.machinery`` module, they **MAY** add - a sub-section for them. + + Additionally, if a Python implementation provides extension + kinds other than the ones listed on ``importlib.machinery`` + module, they **MAY** add a sub-section for them. * - Examples - - ``{'source': ['.py'], 'bytecode': ['.pyc'], 'optimized_bytecode': ['.pyc'], 'debug_bytecode': ['.pyc'], 'extensions': ['.cpython-313-x86_64-linux-gnu.so', '.abi3.so', '.so']}`` - etc. diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 73285bf7bc8..b50b286cedf 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -181,7 +181,7 @@ }, "suffixes": { "type": "object", - "description": "Valid module suffixes grouped by type.\n\nThis section **MUST** be present if the Python installation supports importing external files, and it **SHOULD** be equivalent to the ``importlib.machinery.*_SUFFIXES`` attributes. However, if the Python implementation does not provide suffixes of the kind specified by any of the attributes, the equivalent sub-section is not required to be present. Additionally, if a Python implementation provides extension kinds other than the ones listed on ``importlib.machinery`` module, they **MAY** add a sub-section for them.", + "description": "Valid module suffixes grouped by type.\n\nThis section **MUST** be present if the Python installation supports importing external files, and it **SHOULD** be equivalent to the ``importlib.machinery.*_SUFFIXES`` attributes.\n\nAdditionally, if a Python implementation provides extension kinds other than the ones listed on ``importlib.machinery`` module, they **MAY** add a sub-section for them.", "examples": [ { "source": [".py"], From ae4caa655bcbcd2ce397d45195fd5670144aeb27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:42:03 +0000 Subject: [PATCH 20/22] Simplify c_api description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 7 +++---- peps/pep-0739/python-build-info-v1.0.schema.json | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 84be342c3bb..72d68ace4fc 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -622,8 +622,7 @@ below, which is rendered in an human-readable format here. * - Type - ``object`` * - Description - - Object containing details related to the Python C API, if - available. + - Object containing details related to the Python C API. This section **MUST** be present if the Python implementation provides a C API, otherwise this section will be missing. @@ -667,8 +666,8 @@ below, which is rendered in an human-readable format here. in the ``base_prefix`` key. This field **MUST** be present if the Python implementation - provides pkg-config definition files for the C API, otherwise - this section will be missing. + provides pkg-config definition files, otherwise this section + will be missing. * - Examples - - ``/usr/lib/pkgconfig`` - ``lib/pkgconfig`` diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index b50b286cedf..23f88aeb029 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -229,7 +229,7 @@ }, "c_api": { "type": "object", - "description": "Object containing details related to the Python C API, if available.\n\nThis section **MUST** be present if the Python implementation provides a C API, otherwise this section will be missing.", + "description": "Object containing details related to the Python C API.\n\nThis section **MUST** be present if the Python implementation provides a C API, otherwise this section will be missing.", "required": [ "headers" ], @@ -245,7 +245,7 @@ }, "pkgconfig_path": { "type": "string", - "description": "The path to the pkg-config definition files.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python implementation provides pkg-config definition files for the C API, otherwise this section will be missing.", + "description": "The path to the pkg-config definition files.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python implementation provides pkg-config definition files, otherwise this section will be missing.", "examples": [ "/usr/lib/pkgconfig", "lib/pkgconfig" From 33c236f59a509f578b973ba4e1db1a6898fedbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:42:18 +0000 Subject: [PATCH 21/22] Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 2 +- peps/pep-0739/python-build-info-v1.0.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 72d68ace4fc..2b834bf5246 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -688,7 +688,7 @@ below, which is rendered in an human-readable format here. This is meant to be used as an escape-hatch, to include any relevant data that is not covered by this specification. - Implamentations may choose what data to provide in this section. + Implementations may choose what data to provide in this section. * - Required - **False** * - Additional properties diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index 23f88aeb029..b027611650a 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -255,7 +255,7 @@ }, "arbitrary_data": { "type": "object", - "description": "Object containing extra arbitrary data.\n\nThis is meant to be used as an escape-hatch, to include any relevant data that is not covered by this specification. Implamentations may choose what data to provide in this section.", + "description": "Object containing extra arbitrary data.\n\nThis is meant to be used as an escape-hatch, to include any relevant data that is not covered by this specification. Implementations may choose what data to provide in this section.", "additionalProperties": true } } From 6a8af4761d23fa3be14ac8501a2bc5c653e20e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 22 Jan 2025 00:44:37 +0000 Subject: [PATCH 22/22] Simplify relative paths text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- peps/pep-0739.rst | 20 +++++++------------ .../python-build-info-v1.0.schema.json | 14 ++++++------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/peps/pep-0739.rst b/peps/pep-0739.rst index 2b834bf5246..d8b898592ca 100644 --- a/peps/pep-0739.rst +++ b/peps/pep-0739.rst @@ -132,7 +132,7 @@ below, which is rendered in an human-readable format here. * - Description - Base prefix of the Python installation. - Either an absolute path, or a relative path to directory where + Either an absolute path, or a path relative to directory where this file is contained. * - Examples - ``/usr``, ``../..``, etc. @@ -150,8 +150,7 @@ below, which is rendered in an human-readable format here. * - Description - The path to the Python interprer of the base installation. - Either an absolute path, or a relative path to the path defined - in the ``base_prefix`` key. + Either an absolute path, or a path relative to ``base_prefix``. This field **MUST** be present if the installation provides an interpreter executable. @@ -531,8 +530,7 @@ below, which is rendered in an human-readable format here. * - Description - The path to the dynamic ``libpython`` library. - Either an absolute path, or a relative path to the path defined - in the ``base_prefix`` key. + Either an absolute path, or a path relative to ``base_prefix``. This field **MUST** be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry @@ -556,8 +554,7 @@ below, which is rendered in an human-readable format here. - The path to the dynamic ``libpython`` library for the stable ABI. - Either an absolute path, or a relative path to the path defined - in the ``base_prefix`` key. + Either an absolute path, or a path relative to ``base_prefix``. This field **MUST** be present if the Python installation provides a dynamic ``libpython`` library targetting the Stable @@ -582,8 +579,7 @@ below, which is rendered in an human-readable format here. * - Description - The path to the static ``libpython`` library. - Either an absolute path, or a relative path to the path defined - in the ``base_prefix`` key. + Either an absolute path, or a path relative to ``base_prefix``. This field **MUST** be present if the Python installation provides a static ``libpython`` library, otherwise this entry @@ -642,8 +638,7 @@ below, which is rendered in an human-readable format here. * - Description - The path to the C API headers. - Either an absolute path, or a relative path to the path defined - in the ``base_prefix`` key. + Either an absolute path, or a path relative to ``base_prefix``. * - Examples - - ``/usr/include/python3.14`` - ``include/python3.14`` @@ -662,8 +657,7 @@ below, which is rendered in an human-readable format here. * - Description - The path to the pkg-config definition files. - Either an absolute path, or a relative path to the path defined - in the ``base_prefix`` key. + Either an absolute path, or a path relative to ``base_prefix``. This field **MUST** be present if the Python implementation provides pkg-config definition files, otherwise this section diff --git a/peps/pep-0739/python-build-info-v1.0.schema.json b/peps/pep-0739/python-build-info-v1.0.schema.json index b027611650a..a2b0e9c6563 100644 --- a/peps/pep-0739/python-build-info-v1.0.schema.json +++ b/peps/pep-0739/python-build-info-v1.0.schema.json @@ -19,7 +19,7 @@ }, "base_prefix": { "type": "string", - "description": "Base prefix of the Python installation.\n\nEither an absolute path, or a relative path to directory where this file is contained.", + "description": "Base prefix of the Python installation.\n\nEither an absolute path, or a path relative to directory where this file is contained.", "examples": [ "/usr", "../.." @@ -27,7 +27,7 @@ }, "base_interpreter": { "type": "string", - "description": "The path to the Python interprer of the base installation.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the installation provides an interpreter executable.", + "description": "The path to the Python interprer of the base installation.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the installation provides an interpreter executable.", "examples": [ "/usr/bin/python", "bin/python" @@ -199,7 +199,7 @@ "properties": { "dynamic": { "type": "string", - "description": "The path to the dynamic ``libpython`` library.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing.", + "description": "The path to the dynamic ``libpython`` library.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library, otherwise this entry will be missing.", "examples": [ "/usr/lib/libpython3.14.so.1.0", "lib/libpython3.14.so.1.0" @@ -207,7 +207,7 @@ }, "dynamic_stableabi": { "type": "string", - "description": "The path to the dynamic ``libpython`` library for the stable ABI.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library targetting the Stable ABI, otherwise this entry will be missing.\n\nIf this key is present ``dynamic`` **MUST** also be set.", + "description": "The path to the dynamic ``libpython`` library for the stable ABI.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the Python installation provides a dynamic ``libpython`` library targetting the Stable ABI, otherwise this entry will be missing.\n\nIf this key is present ``dynamic`` **MUST** also be set.", "examples": [ "/usr/lib/libpython3.so", "lib/libpython3.so" @@ -215,7 +215,7 @@ }, "static": { "type": "string", - "description": "The path to the static ``libpython`` library.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python installation provides a static ``libpython`` library, otherwise this entry will be missing.", + "description": "The path to the static ``libpython`` library.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the Python installation provides a static ``libpython`` library, otherwise this entry will be missing.", "examples": [ "/usr/lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a", "lib/python3.14/config-3.14-x86_64-linux-gnu/libpython3.14.a" @@ -237,7 +237,7 @@ "properties": { "headers": { "type": "string", - "description": "The path to the C API headers.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.", + "description": "The path to the C API headers.\n\nEither an absolute path, or a path relative to ``base_prefix``.", "examples": [ "/usr/include/python3.14", "include/python3.14" @@ -245,7 +245,7 @@ }, "pkgconfig_path": { "type": "string", - "description": "The path to the pkg-config definition files.\n\nEither an absolute path, or a relative path to the path defined in the ``base_prefix`` key.\n\nThis field **MUST** be present if the Python implementation provides pkg-config definition files, otherwise this section will be missing.", + "description": "The path to the pkg-config definition files.\n\nEither an absolute path, or a path relative to ``base_prefix``.\n\nThis field **MUST** be present if the Python implementation provides pkg-config definition files, otherwise this section will be missing.", "examples": [ "/usr/lib/pkgconfig", "lib/pkgconfig"