build-details.json v1.0

Specification

https://packaging.python.org/en/latest/specifications/schemas/build-details-v1.0.schema.json

build-details.json — a static description file with build details of Python installations

type

object

properties

  • schema_version

Schema version.

This is a string following the format <MAJOR>.<MINOR>, where <MAJOR> and <MINOR> 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.

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 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).

type

string

const

1.0

  • base_prefix

Base prefix of the Python installation.

Either an absolute path, or a path relative to directory where this file is contained.

type

string

examples

/usr

../..

  • base_interpreter

The path to the Python interprer of the base installation.

Either an absolute path, or a path relative to base_prefix.

This field MUST be present if the installation provides an interpreter executable.

type

string

examples

/usr/bin/python

bin/python

  • platform

System platform string.

This field SHOULD be equivalent to sysconfig.get_platform().

type

string

examples

linux-x86_64

  • language

Object containing details related to the Python language specification.

type

object

properties

  • version

String representation the Python language version — a version string consisting only of the major and minor components.

This field SHOULD be equivalent to sysconfig.get_python_version().

type

string

examples

3.14

  • version_info

Object in the format of sys.version_info.

This section SHOULD be equivalent to sys.version_info.

type

object

examples

major

3

minor

14

micro

1

releaselevel

final

serial

0

properties

  • major

type

number

  • minor

type

number

  • micro

type

number

  • releaselevel

type

string

enum

alpha, beta, candidate, final

  • serial

type

number

additionalProperties

False

additionalProperties

False

  • implementation

Object containing details related to Python implementation.

This section SHOULD be equivalent to 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.

type

object

properties

  • name

Lower-case name of the Python implementation.

type

string

examples

cpython

pypy

  • version

Object in the format of sys.version_info, containing the implementation version.

type

object

examples

major

3

minor

14

micro

1

releaselevel

final

serial

0

major

7

minor

3

micro

16

releaselevel

final

serial

0

properties

  • major

type

number

  • minor

type

number

  • micro

type

number

  • releaselevel

type

string

enum

alpha, beta, candidate, final

  • serial

type

number

additionalProperties

False

additionalProperties

True

  • abi

Object containing details related to ABI.

type

object

properties

  • flags

Build configuration flags, used to calculate the extension suffix.

The flags MUST be defined in the order they appear on the extension suffix.

type

array

examples

t

d

  • extension_suffix

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.

type

string

examples

.cpython-314-x86_64-linux-gnu.so

  • stable_abi_suffix

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 missing.

type

string

examples

.abi3.so

additionalProperties

False

  • suffixes

Valid module suffixes grouped by type.

This section MUST be present if the Python installation supports importing external files, and it SHOULD be equivalent to the importlib.machinery.*_SUFFIXES attributes.

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.

type

object

examples

source

.py

bytecode

.pyc

optimized_bytecode

.pyc

debug_bytecode

.pyc

extensions

.cpython-313-x86_64-linux-gnu.so

.abi3.so

.so

  • libpython

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.

type

object

properties

  • dynamic

The path to the dynamic libpython library.

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 will be missing.

type

string

examples

/usr/lib/libpython3.14.so.1.0

lib/libpython3.14.so.1.0

  • dynamic_stableabi

The path to the dynamic libpython library for the stable ABI.

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 targeting the Stable ABI, otherwise this entry will be missing.

If this key is present dynamic MUST also be set.

type

string

examples

/usr/lib/libpython3.so

lib/libpython3.so

  • static

The path to the static libpython library.

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 will be missing.

type

string

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

  • link_extensions

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.

type

boolean

additionalProperties

False

  • c_api

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.

type

object

properties

  • headers

The path to the C API headers.

Either an absolute path, or a path relative to base_prefix.

type

string

examples

/usr/include/python3.14

include/python3.14

  • pkgconfig_path

The path to the pkg-config definition files.

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 will be missing.

type

string

examples

/usr/lib/pkgconfig

lib/pkgconfig

additionalProperties

False

  • arbitrary_data

Object containing extra arbitrary data.

This 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.

type

object

additionalProperties

True

additionalProperties

False

Example

{
  "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"
  }
}