diff -Nru python-build-0.7.0/debian/changelog python-build-0.7.0/debian/changelog --- python-build-0.7.0/debian/changelog 2021-12-12 00:20:52.000000000 +0000 +++ python-build-0.7.0/debian/changelog 2024-03-28 19:42:32.000000000 +0000 @@ -1,3 +1,10 @@ +python-build (0.7.0-2ubuntu0.1) jammy; urgency=medium + + * d/p/debian-sysconfig-layouts.patch: Handle Debian's default posix_local + sysconfig layout (LP: #1992108) + + -- Dave Jones Thu, 28 Mar 2024 19:42:32 +0000 + python-build (0.7.0-2) unstable; urgency=medium * Team upload. diff -Nru python-build-0.7.0/debian/control python-build-0.7.0/debian/control --- python-build-0.7.0/debian/control 2021-12-12 00:15:24.000000000 +0000 +++ python-build-0.7.0/debian/control 2024-03-28 19:42:32.000000000 +0000 @@ -1,7 +1,8 @@ Source: python-build Section: python Priority: optional -Maintainer: Debian Python Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Python Team Uploaders: Sergio Durigan Junior Build-Depends: debhelper-compat (= 13), dh-python, diff -Nru python-build-0.7.0/debian/patches/debian-sysconfig-layouts.patch python-build-0.7.0/debian/patches/debian-sysconfig-layouts.patch --- python-build-0.7.0/debian/patches/debian-sysconfig-layouts.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-build-0.7.0/debian/patches/debian-sysconfig-layouts.patch 2024-03-28 19:42:30.000000000 +0000 @@ -0,0 +1,48 @@ +From: Stefano Rivera +Date: Wed, 20 Apr 2022 17:30:31 -0400 +Subject: Handle Debian's posix_local scheme + +The issue and solution is the same as OSX. +The venv scheme wasn't standardised yet, so it's not using it yet. + +Forwarded: https://github.com/pypa/build/pull/463 +Bug-Debian: https://bugs.debian.org/1009916 +--- + src/build/env.py | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +diff --git a/src/build/env.py b/src/build/env.py +index 4b0725a..3a85ba2 100644 +--- a/src/build/env.py ++++ b/src/build/env.py +@@ -287,14 +287,22 @@ def _find_executable_and_scripts(path: str) -> Tuple[str, str, str]: + """ + config_vars = sysconfig.get_config_vars().copy() # globally cached, copy before altering it + config_vars['base'] = path +- # The Python that ships with the macOS developer tools varies the +- # default scheme depending on whether the ``sys.prefix`` is part of a framework. +- # The framework "osx_framework_library" scheme +- # can't be used to expand the paths in a venv, which +- # can happen if build itself is not installed in a venv. +- # If the Apple-custom "osx_framework_library" scheme is available +- # we enforce "posix_prefix", the venv scheme, for isolated envs. +- if 'osx_framework_library' in sysconfig.get_scheme_names(): ++ scheme_names = sysconfig.get_scheme_names() ++ if 'posix_local' in scheme_names: ++ # The Python that ships on Debian/Ubuntu varies the default scheme to ++ # install to /usr/local ++ # But it does not (yet) set the "venv" scheme. ++ # If we're the Debian "posix_local" scheme is available, but "venv" ++ # is not, we use "posix_prefix" instead which is venv-compatible there. ++ paths = sysconfig.get_paths(scheme='posix_prefix', vars=config_vars) ++ elif 'osx_framework_library' in scheme_names: ++ # The Python that ships with the macOS developer tools varies the ++ # default scheme depending on whether the ``sys.prefix`` is part of a framework. ++ # The framework "osx_framework_library" scheme ++ # can't be used to expand the paths in a venv, which ++ # can happen if build itself is not installed in a venv. ++ # If the Apple-custom "osx_framework_library" scheme is available ++ # we enforce "posix_prefix", the venv scheme, for isolated envs. + paths = sysconfig.get_paths(scheme='posix_prefix', vars=config_vars) + else: + paths = sysconfig.get_paths(vars=config_vars) diff -Nru python-build-0.7.0/debian/patches/series python-build-0.7.0/debian/patches/series --- python-build-0.7.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ python-build-0.7.0/debian/patches/series 2024-03-28 19:42:30.000000000 +0000 @@ -0,0 +1 @@ +debian-sysconfig-layouts.patch