36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
From f89d53feda7314c91578d03f77fee4596b1e3860 Mon Sep 17 00:00:00 2001
|
|
From: Christoph Reiter <reiter.christoph@gmail.com>
|
|
Date: Fri, 25 Aug 2023 21:36:58 +0200
|
|
Subject: [PATCH 143/N] setup.py: don't prepend the system library
|
|
directories when building extensions
|
|
|
|
For some reason the code assumes that relative paths are build paths prepends
|
|
the system dirs after relative paths in the existing list. We only uses absolute
|
|
paths though, and I don't understand why it even tries to do that.
|
|
|
|
So just append the system dirs instead.
|
|
|
|
This fixes the build trying to link against the system Python DLL in case it happens
|
|
to be installed.
|
|
---
|
|
setup.py | 6 ++----
|
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/setup.py b/setup.py
|
|
index 115ba4f..134e11a 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -890,10 +890,8 @@ def init_inc_lib_dirs(self):
|
|
# (PYTHONFRAMEWORK is set) to avoid # linking problems when
|
|
# building a framework with different architectures than
|
|
# the one that is currently installed (issue #7473)
|
|
- add_dir_to_list(self.compiler.library_dirs,
|
|
- sysconfig.get_config_var("LIBDIR"))
|
|
- add_dir_to_list(self.compiler.include_dirs,
|
|
- sysconfig.get_config_var("INCLUDEDIR"))
|
|
+ self.compiler.library_dirs.append(sysconfig.get_config_var("LIBDIR"))
|
|
+ self.compiler.include_dirs.append(sysconfig.get_config_var("INCLUDEDIR"))
|
|
|
|
system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
|
|
system_include_dirs = ['/usr/include']
|