Closed
Description
Feature or enhancement
Ship a static file that describes various aspects of the installation as part of the Python installation.
UPDATE: Proposed as PEP 739, which has been accepted.
Pitch
Shipping such a file would make it much easier to introspect a Python installation without having to run the interpreter. There are many use-cases for this, but some key would be for eg. Python launchers, and cross-compilation tooling.
Information we could provide:
- Python language version
- Python implementation (inc. version)
- Interpreter path
- Standard library path
- Interpreter architecture
- Python ABI
- Tag (PEP 3149 on Posix)
- Build flags (debug, trace refs)
- Static
libpython
(available?)- Name
- Location
- Shared
libpython
(available?)- Name (standard library)
- Major-only pin library name (eg.
libpython3.so
) - Location
- C API
- Hex version
- Include paths
- Required C flags
- Supported native module file extensions
- Interpreter-specific
- Stable ABI
(incomplete table, just an initial proposal)
Note: This issue specifically targets a descriptor file for the Python installation, not a Python environment, so paths are out of scope.
Previous discussion
(cc @brettcannon)