Ticket #11157: python-2.7.3rc2-2.2.diff

File python-2.7.3rc2-2.2.diff, 4.7 KB (added by Cybjit <cybjit@…>, 4 years ago)

update to 2.7.3rc2 ver2 (rebased)

  • lang/python/Makefile

    diff --git a/lang/python/Makefile b/lang/python/Makefile
    index 2a541d0..6879898 100644
    a b  
    88include $(TOPDIR)/rules.mk 
    99 
    1010PKG_NAME:=python 
    11 PKG_VERSION:=2.7.3rc2 
    12 PKG_RELEASE:=1 
     11 
     12PY_VERSION:=2.7.3 
     13PY_RC:=rc2 
     14PKG_VERSION:=$(PY_VERSION)$(PY_RC) 
     15PKG_RELEASE:=2 
    1316 
    1417PKG_SOURCE:=Python-$(PKG_VERSION).tar.bz2 
    15 PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)/ 
     18PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PY_VERSION)/ 
    1619PKG_MD5SUM:=67059e1bcaf19e19394d16b80637f75f 
    1720 
    1821PKG_INSTALL:=1 
    $(call Package/python/Default) 
    118121 DEPENDS+=+python-mini +libgdbm 
    119122endef 
    120123 
     124define Package/python-readline 
     125$(call Package/python/Default) 
     126 TITLE:=Python support for readline 
     127 DEPENDS+=+python-mini +libreadline +libncurses @BROKEN 
     128endef 
     129 
    121130MAKE_FLAGS:=\ 
    122131        $(TARGET_CONFIGURE_OPTS) \ 
    123132        DESTDIR="$(PKG_INSTALL_DIR)" \ 
    define Build/Configure 
    147156                --with-threads \ 
    148157                --with-system-ffi="$(STAGING_DIR)/usr" \ 
    149158                $(ENABLE_IPV6) \ 
    150                 ac_cv_lib_readline_readline=no \ 
    151159                ac_cv_have_chflags=no \ 
    152160                ac_cv_have_lchflags=no \ 
    153161                ac_cv_py_format_size_t=no \ 
    define PyPackage/python-gdbm/filespec 
    427435+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so 
    428436endef 
    429437 
     438define PyPackage/python-readline/filespec 
     439+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so 
     440endef 
     441 
    430442define Host/Configure 
    431443        -$(MAKE) -C $(HOST_BUILD_DIR) distclean 
    432444        (cd $(HOST_BUILD_DIR); autoreconf --force --install || exit 0) 
    $(eval $(call PyPackage,python-openssl)) 
    467479$(eval $(call PyPackage,python-shutil)) 
    468480$(eval $(call PyPackage,python-sqlite3)) 
    469481$(eval $(call PyPackage,python-gdbm)) 
     482$(eval $(call PyPackage,python-readline)) 
    470483 
    471484$(eval $(call BuildPackage,python)) 
    472485$(eval $(call BuildPackage,python-mini)) 
    $(eval $(call BuildPackage,python-openssl)) 
    478491$(eval $(call BuildPackage,python-shutil)) 
    479492$(eval $(call BuildPackage,python-sqlite3)) 
    480493$(eval $(call BuildPackage,python-gdbm)) 
     494$(eval $(call BuildPackage,python-readline)) 
  • new file lang/python/patches/130-readline-setup.patch

    diff --git a/lang/python/patches/130-readline-setup.patch b/lang/python/patches/130-readline-setup.patch
    new file mode 100644
    index 0000000..c19dbb2
    - +  
     1--- a/setup.py 
     2+++ b/setup.py 
     3@@ -573,32 +573,7 @@ class PyBuildExt(build_ext): 
     4         # readline 
     5         do_readline = self.compiler.find_library_file(lib_dirs, 'readline') 
     6         readline_termcap_library = "" 
     7-        curses_library = "" 
     8-        # Determine if readline is already linked against curses or tinfo. 
     9-        if do_readline and find_executable('ldd'): 
     10-            fp = os.popen("ldd %s" % do_readline) 
     11-            ldd_output = fp.readlines() 
     12-            ret = fp.close() 
     13-            if ret is None or ret >> 8 == 0: 
     14-                for ln in ldd_output: 
     15-                    if 'curses' in ln: 
     16-                        readline_termcap_library = re.sub( 
     17-                            r'.*lib(n?cursesw?)\.so.*', r'\1', ln 
     18-                        ).rstrip() 
     19-                        break 
     20-                    if 'tinfo' in ln: # termcap interface split out from ncurses 
     21-                        readline_termcap_library = 'tinfo' 
     22-                        break 
     23-        # Issue 7384: If readline is already linked against curses, 
     24-        # use the same library for the readline and curses modules. 
     25-        if 'curses' in readline_termcap_library: 
     26-            curses_library = readline_termcap_library 
     27-        elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): 
     28-            curses_library = 'ncursesw' 
     29-        elif self.compiler.find_library_file(lib_dirs, 'ncurses'): 
     30-            curses_library = 'ncurses' 
     31-        elif self.compiler.find_library_file(lib_dirs, 'curses'): 
     32-            curses_library = 'curses' 
     33+        curses_library = "ncurses" 
     34  
     35         if platform == 'darwin': 
     36             os_release = int(os.uname()[2].split('.')[0]) 
  • new file lang/python/patches/140-verbose-sharedmods.patch

    diff --git a/lang/python/patches/140-verbose-sharedmods.patch b/lang/python/patches/140-verbose-sharedmods.patch
    new file mode 100644
    index 0000000..a761c34
    - +  
     1--- a/Makefile.pre.in 
     2+++ b/Makefile.pre.in 
     3@@ -410,7 +410,7 @@ platform: $(BUILDPYTHON) 
     4 # Build the shared modules 
     5 sharedmods: $(BUILDPYTHON) 
     6        @case $$MAKEFLAGS in \ 
     7-       *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ 
     8+       *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ 
     9        *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ 
     10        esac 
     11