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 1/3] 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 2/3] 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 3/3] 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." }