On Mon, 11 Apr 2022 22:18:26 +0300 Ievgen Popovych <jmenn...@gmail.com> wrote: > Hello, > > I had the same issue when building a package with a system interpreter: > sysconfig module reports incorrect paths (pointing to `site-packages` > instead of `dist-packages`). > The culprit seems to be that it thinks that > > Current installation scheme: "posix_prefix" > instead of `deb_system`. > That, in turn, looks to be an issue with `_get_default_scheme()` > implementation in `patches/sysconfig-debian-schemes.diff` which > depends on environment variable `DEB_PYTHON_INSTALL_LAYOUT`. > The only reference I found is a changelog entry stating that this is > indeed a desired behavior. > > But I wonder why? > It is inconsistent with distutils behavior. > It does not refer to (quoting sysconfig module docstring) > > Python’s configuration information like the list of installation paths and > > the configuration variables relevant for the current platform > In current form it is essentially irrelevant. >
I was just playing a bit more and it turns out that `/usr/lib/python3.9/sysconfig.py` does not include changes from `patches/sysconfig-debian-schemes.diff` at all! I've verified I do have Debian Bullseye :), file is proided by `libpython3.9-minimal:amd64:`. sysconfig-debian-schemes.diff is also in `patches/series`. I do not know what to think at this point..