python-setuptools: fix patch for 82.0.1

The 0001-distutils-use-python-sysroot.patch was written against an
older setuptools where the build_ext LIBDIR yield had less indentation.
In 82.0.1, a z/OS platform check wrapped the code adding an extra
indentation level. Regenerate the patch against the actual 82.0.1 source.

Signed-off-by: Alexandru Ardelean <alex@mesatop.com>
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
Alexandru Ardelean
2026-04-03 21:54:57 +03:00
committed by Alexandru Ardelean
parent 733123acf7
commit e59ee5686d

View File

@@ -20,8 +20,6 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
setuptools/_distutils/sysconfig.py | 15 +++++++++++----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/setuptools/_distutils/command/build_ext.py b/setuptools/_distutils/command/build_ext.py
index df623d7..068bc6b 100644
--- a/setuptools/_distutils/command/build_ext.py
+++ b/setuptools/_distutils/command/build_ext.py
@@ -156,7 +156,10 @@ class build_ext(Command):
@@ -32,12 +30,10 @@ index df623d7..068bc6b 100644
+ libdir = sysconfig.get_config_var('LIBDIR')
+ if "_python_sysroot" in os.environ:
+ libdir = os.environ.get("_python_sysroot") + libdir
+ yield libdir
+ yield libdir
def finalize_options(self) -> None: # noqa: C901
from distutils import sysconfig
diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py
index 7ddc869..7bd2fa9 100644
--- a/setuptools/_distutils/sysconfig.py
+++ b/setuptools/_distutils/sysconfig.py
@@ -37,10 +37,17 @@ else: