aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2018-01-05 13:31:37 -0500
committerMichał Górny <mgorny@gentoo.org>2023-06-07 15:30:07 +0200
commit405760e8a01659a20c139fd6321b0cd55208b778 (patch)
treed45612db87876d991700331e3a4d2849103d57ed /setup.py
parentTemporary hack: handle all extensions via .addext() (diff)
downloadcpython-405760e8a01659a20c139fd6321b0cd55208b778.tar.gz
cpython-405760e8a01659a20c139fd6321b0cd55208b778.tar.bz2
cpython-405760e8a01659a20c139fd6321b0cd55208b778.zip
Replace hard-coded system libdir list
This resolves a build failure against system libffi on platforms where libdir is not "lib64" or "lib". Bug: https://bugs.gentoo.org/850151
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index c207a6c5cd2..a5d5e1af484 100644
--- a/setup.py
+++ b/setup.py
@@ -847,7 +847,7 @@ class PyBuildExt(build_ext):
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
if not CROSS_COMPILING:
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/@@GENTOO_LIBDIR@@')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia
if CROSS_COMPILING:
@@ -868,7 +868,7 @@ class PyBuildExt(build_ext):
add_dir_to_list(self.compiler.include_dirs,
sysconfig.get_config_var("INCLUDEDIR"))
- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
+ system_lib_dirs = ['/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@']
system_include_dirs = ['/usr/include']
# lib_dirs and inc_dirs are used to search for files;
# if a file is found in one of those directories, it can
@@ -1108,11 +1108,11 @@ class PyBuildExt(build_ext):
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(self.lib_dirs +
- ['/usr/lib/termcap'],
+ ['/usr/@@GENTOO_LIBDIR@@/termcap'],
'termcap'):
readline_libs.append('termcap')
self.addext(Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
+ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
libraries=readline_libs))
else:
self.addext(Extension('readline', ['readline.c']))