Python library and CLI tool to introspect Python installations.
$ pip install python-instrospection
$ python -m python_introspection (options) <command> ...
Option | Description |
---|---|
--interpreter <path> |
Selects the Python interpreter to instrospect. |
--output <path> |
Write introspection data to the specified file. |
Generated a build-details.json
file (from PEP 739).
$ python -m python_introspection generate-build-details (options)
Option | Description |
---|---|
--schema-version <value> |
Schema version of the build-details.json file to generate. |
--relative-paths |
Whether to specify paths as absolute, or as relative paths to base_prefix . |
A full example, putting together the base --interpreter
and --output
options with
the options to generate-build-details
:
$ python -m python_introspection --interpreter $(which python) --output build-details.json generate-build-details --relative-paths