Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | package python-readline |
| 2 | |
| 3 | -Khem |
| 4 | |
| 5 | Upstream-Status: Inappropriate [Embedded Specific] |
| 6 | |
| 7 | --- a/setup.py |
| 8 | +++ b/setup.py |
| 9 | @@ -666,45 +666,7 @@ class PyBuildExt(build_ext): |
| 10 | # readline |
| 11 | do_readline = self.compiler.find_library_file(lib_dirs, 'readline') |
| 12 | readline_termcap_library = "" |
| 13 | - curses_library = "" |
| 14 | - # Cannot use os.popen here in py3k. |
| 15 | - tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib') |
| 16 | - if not os.path.exists(self.build_temp): |
| 17 | - os.makedirs(self.build_temp) |
| 18 | - # Determine if readline is already linked against curses or tinfo. |
| 19 | - if do_readline: |
| 20 | - if cross_compiling: |
| 21 | - ret = os.system("%s -d %s | grep '(NEEDED)' > %s" \ |
| 22 | - % (sysconfig.get_config_var('READELF'), |
| 23 | - do_readline, tmpfile)) |
| 24 | - elif find_executable('ldd'): |
| 25 | - ret = os.system("ldd %s > %s" % (do_readline, tmpfile)) |
| 26 | - else: |
| 27 | - ret = 256 |
| 28 | - if ret >> 8 == 0: |
| 29 | - with open(tmpfile) as fp: |
| 30 | - for ln in fp: |
| 31 | - if 'curses' in ln: |
| 32 | - readline_termcap_library = re.sub( |
| 33 | - r'.*lib(n?cursesw?)\.so.*', r'\1', ln |
| 34 | - ).rstrip() |
| 35 | - break |
| 36 | - # termcap interface split out from ncurses |
| 37 | - if 'tinfo' in ln: |
| 38 | - readline_termcap_library = 'tinfo' |
| 39 | - break |
| 40 | - if os.path.exists(tmpfile): |
| 41 | - os.unlink(tmpfile) |
| 42 | - # Issue 7384: If readline is already linked against curses, |
| 43 | - # use the same library for the readline and curses modules. |
| 44 | - if 'curses' in readline_termcap_library: |
| 45 | - curses_library = readline_termcap_library |
| 46 | - elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): |
| 47 | - curses_library = 'ncursesw' |
| 48 | - elif self.compiler.find_library_file(lib_dirs, 'ncurses'): |
| 49 | - curses_library = 'ncurses' |
| 50 | - elif self.compiler.find_library_file(lib_dirs, 'curses'): |
| 51 | - curses_library = 'curses' |
| 52 | + curses_library = "ncurses" |
| 53 | |
| 54 | if host_platform == 'darwin': |
| 55 | os_release = int(os.uname()[2].split('.')[0]) |