FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[WIP] bpo-1294959: setup.py uses sys.platlibdir by vstinner · Pull Request #18917 · python/cpython · GitHub

Repository navigation

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .rst  (1) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
setup.py now uses :attr:`sys.platlibdir` to configure the compiler library
directories and to locate the termcap library.
7 changes: 4 additions & 3 deletions setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def configure_compiler(self):
# 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, f'/usr/local/{sys.platlibdir}')
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:
Expand Down Expand Up @@ -993,16 +993,17 @@ def detect_readline_curses(self):
readline_extra_link_args = ()

readline_libs = ['readline']
termcap_libdir = f'/usr/{sys.platlibdir}/termcap'
if readline_termcap_library:
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(self.lib_dirs +
['/usr/lib/termcap'],
[termcap_libdir],
'termcap'):
readline_libs.append('termcap')
self.add(Extension('readline', ['readline.c'],
library_dirs=['/usr/lib/termcap'],
library_dirs=[termcap_libdir],
extra_link_args=readline_extra_link_args,
libraries=readline_libs))
else:
Expand Down

Back | FazBrowse Home | New Git URL