38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
From 4ee7b56c5b35a5f56ea45b2383bc0b5c4acdb788 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 113/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 b46ae08..e87e3ad 100644
|
|
--- a/Lib/distutils/command/build_ext.py
|
|
+++ b/Lib/distutils/command/build_ext.py
|
|
@@ -227,7 +227,7 @@ def finalize_options(self):
|
|
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 @@ def finalize_options(self):
|
|
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
|