[MacPorts] #31216: build python against libedit instead of readline

MacPorts noreply at macports.org
Sat Nov 5 21:37:59 PDT 2011


#31216: build python against libedit instead of readline
-----------------------------------------------------------+----------------
  Reporter:  jmr@…                                         |       Owner:  macports-tickets@…                   
      Type:  enhancement                                   |      Status:  closed                               
  Priority:  Normal                                        |   Milestone:                                       
 Component:  ports                                         |     Version:                                       
Resolution:  fixed                                         |    Keywords:  haspatch                             
      Port:  python25 python26 python27 python31 python32  |  
-----------------------------------------------------------+----------------

Comment(by nad@…):

 Note that linking with libedit instead of GNU readline introduces
 potential user incompatibilities.  As noted in the
 [http://docs.python.org/library/readline.html docs for the Python readline
 module ] ,  the configuration file commands for libedit are different than
 readline.  For example, if you have a PYTHONSTARTUP file set up to enable
 tab completion in the Python interactive interpreter, the directives have
 to be changed or be conditional based on which library is used or
 directives have to be added to .editrc  (the libedit defaults file).
 Here's an example:
 {{{
     import rlcompleter
     if 'libedit' in readline.__doc__:
         readline.parse_and_bind("bind ^I rl_complete")
     else:  # GNU readline format
         readline.parse_and_bind("tab: complete")
 }}}

 Also, py27-ipython and py32-ipython (at least) complain when running with
 a python linked with libedit:

 {{{
 /macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/IPython/utils/rlineimpl.py:96:
 RuntimeWarning: Leopard libedit detected - readline will not be well
 behaved including some crashes on tab completion, and
 incorrect history navigation. It is highly recommended that you install
 readline, which is easy_installable with: 'easy_install readline'
   RuntimeWarning)
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/31216#comment:5>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list