During the downstream adoption of PEP 739, where we added a build-details.json file to the standard library directory, some issues came up regarding it conflicting on multiple installations.
We never defined a policy on what shape of installations we support, or what kind of configurations we support installed in parallel.
To make things simple, for now, I want to ask the following questions.
-
Do we support installing debug and non-debug builds under the same
prefix,libdir, andlibdirsubdirectory? -
Do we support installing regular and free-threaded builds under the same
prefix,libdir, andlibdirsubdirectory? What about future different ABIs? -
Do we support installing the same build, but of multiple architectures under the same
prefix,libdir? -
Are there any other considerations we should take into account?
These questions are in regard to shipping Python to users, not local installations for development.
Additionally, please consider the following:
- Currently, the PyPI ecosystem is only prepared for same-ABI same-platform packages
- Debug builds are the outlier here – they able to load extension modules for the same non-debug ABI.
- Cases 2) and 3) currently fundamentally break the PyPI ecosystem
- Currently, installations using the official Windows installer, but only because of a technical limitation with Windows installers, which is problematic
- Even though installations might have the same
prefix,libdir, andlibdirsubdirectory, currently, they all still need to have their own set of headers (this is something we could change, but is the current status-quo)
There’s probably something I missed, but I think this is enough to get the conversation started.
That said, whatever we decide, I acknowledge it would be difficult to enforce the policy, but I still believe it is something we should do. This sets expectations for downstream distributors, and is something we can reference when we receive bug reports from users due to the policy not being followed. With this, I am not saying we simply deny support to users, IMO we would consider situations on a case-by-case basis.