Files
MINGW-packages/mingw-w64-python/0142-distutils-add-build-root-to-libdirs-when-building-un.patch
2022-06-10 17:54:24 +02:00

41 lines
1.8 KiB
Diff

From e31e5e01d7ee2504378d219a8557803ac41a8646 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Mon, 6 Jun 2022 16:24:55 +0200
Subject: [PATCH 142/N] distutils: add build root to libdirs when building
uninstalled
The distutils test suite builds extensions which need to link
to libpython despite it being uninstalled. The code currently assumes
that the working directory is the build root, but that is not the case
in the tests (it's in some temp dir). Explicitely pass the build root
instead where the uninstalled libpython can be found.
---
Lib/distutils/command/build_ext.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index 82a21d2..ab1a3e7 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -227,7 +227,7 @@ class build_ext(Command):
config_dir_name))
else:
# building python standard extensions
- self.library_dirs.append('.')
+ self.library_dirs.append(sysconfig.project_base)
# For building extensions with a shared Python library,
# Python's library directory must be appended to library_dirs
@@ -238,7 +238,7 @@ class build_ext(Command):
self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
else:
# building python standard extensions
- self.library_dirs.append('.')
+ self.library_dirs.append(sysconfig.project_base)
# The argument parsing will result in self.define being a string, but
# it has to be a list of 2-tuples. All the preprocessor symbols
--
2.36.1