[arch-commits] Commit in python/trunk (5 files)

Allan McRae allan at archlinux.org
Wed Jun 25 13:06:41 UTC 2008


    Date: Wednesday, June 25, 2008 @ 09:06:41
  Author: allan
Revision: 3576

upgpkg: python 2.5.2-3
    Removed /usr/lib/python2.4 folder from module search path
Added patch for IDLE tk8.5 compatibility (FS#10367)
Added provides/replaces for python-elementtree (FS#10699)
Added post install meesage about tk requirement (FS#10742)
Used launcher for pynche/modulator instead of using echo statements

Added:
  python/trunk/Python-2.5.2-idlelib.patch
  python/trunk/modulator-launcher
  python/trunk/pynche-launcher
  python/trunk/python.install
Modified:
  python/trunk/PKGBUILD

----------------------------+
 PKGBUILD                   |   72 ++++++++++++++++++++-----------------------
 Python-2.5.2-idlelib.patch |   17 ++++++++++
 modulator-launcher         |    2 +
 pynche-launcher            |    3 +
 python.install             |   13 +++++++
 5 files changed, 69 insertions(+), 38 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-06-25 11:15:20 UTC (rev 3575)
+++ PKGBUILD	2008-06-25 13:06:41 UTC (rev 3576)
@@ -1,8 +1,10 @@
 # $Id$
-# Maintainer: Jason Chu <jason at archlinux.org>
+# Maintainer: Allan McRae <allan at archlinux.org>
+# Contributer: Jason Chu <jason at archlinux.org>
+
 pkgname=python
 pkgver=2.5.2
-pkgrel=2
+pkgrel=3
 _pybasever=2.5
 pkgdesc="A high-level scripting language"
 arch=('i686' 'x86_64')
@@ -10,67 +12,61 @@
 url="http://www.python.org"
 depends=('db>=4.6' 'bzip2' 'gdbm' 'openssl>=0.9.8d' 'zlib')
 makedepends=('tk>=8.5.0' 'sqlite3')
-provides=('python-ctypes')
-conflicts=('python-ctypes')
-replaces=('python-ctypes')
+provides=('python-elementree')
+replaces=('python-elementree')
+install=python.install
 source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.bz2
+	modulator-launcher
+	pynche-launcher
 	Python-2.4.4-gdbm-1.patch
 	db4.6-setup.py-detection.patch
 	python-2.5.CVE-2007-4965-int-overflow.patch
-	python2.6-set_wakeup_fd4.patch)
+	python2.6-set_wakeup_fd4.patch
+	Python-2.5.2-idlelib.patch)
 md5sums=('afb5451049eda91fbde10bd5a4b7fadc'
+         'faa0d4b947bfe67fc8684b5c464f46f2'
+         '60a44af1d8af276274e20c564c0f3d8b'
          '2b61e06365e9fb5f3af22d946efa8be6'
          'ad59f0d7c862d9714c7580899bc1c356'
          '491416c1b337fc61b6cdf5981d895a7d'
-         'ec56710959deb01b5fa35829cafec6a3')
+         'ec56710959deb01b5fa35829cafec6a3'
+         'e6441e0b013ac64795221154e0495e10')
 
 build() {
   cd ${startdir}/src/Python-${pkgver}
-  patch -Np1 -i ${startdir}/src/Python-2.4.4-gdbm-1.patch || return 1
-  patch -Np0 -i ${startdir}/src/db4.6-setup.py-detection.patch || return 1
+  patch -Np1 -i ${srcdir}/Python-2.4.4-gdbm-1.patch || return 1
+  patch -Np0 -i ${srcdir}/db4.6-setup.py-detection.patch || return 1
   # fix http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-4965
-  patch -Np1 -i ${startdir}/src//python-2.5.CVE-2007-4965-int-overflow.patch || return 1
+  patch -Np1 -i ${srcdir}/python-2.5.CVE-2007-4965-int-overflow.patch || return 1
+  
+  patch -Np2 -i ${srcdir}/python2.6-set_wakeup_fd4.patch || return 1
+  patch -Np0 -i ${srcdir}/Python-2.5.2-idlelib.patch
 
-  patch -Np2 -i ${startdir}/src/python2.6-set_wakeup_fd4.patch || return 1
-
   ./configure --prefix=/usr --enable-shared --with-threads --enable-unicode
-  # This is supposed to be the previous version's python directory
-  #  NOT the current one
-  sed -i 's#SITEPATH=#SITEPATH=:../python2.4/site-packages#' Makefile
   make || return 1
-  make DESTDIR=${startdir}/pkg install
+  make DESTDIR=${pkgdir} install
 
-  rm ${startdir}/pkg/usr/bin/python
-  ln -sf python${_pybasever} ${startdir}/pkg/usr/bin/python
+  rm ${pkgdir}/usr/bin/python
+  ln -sf python${_pybasever} ${pkgdir}/usr/bin/python
 
   # Install the tools
   #modulator
-  cat > ${startdir}/pkg/usr/bin/modulator << EOF
-#!/bin/bash
-exec /usr/lib/python${_pybasever}/site-packages/modulator/modulator.py
-EOF
+  install -m755 ${srcdir}/modulator-launcher ${pkgdir}/usr/bin/modulator
+  cp -r Tools/modulator ${pkgdir}/usr/lib/python${_pybasever}/site-packages/
 
-  chmod 755 ${startdir}/pkg/usr/bin/modulator
-  cp -r Tools/modulator ${startdir}/pkg/usr/lib/python${_pybasever}/site-packages/
-
   #pynche
-  cat > ${startdir}/pkg/usr/bin/pynche << EOF
-#!/bin/bash
-exec /usr/lib/python${_pybasever}/site-packages/pynche/pynche
-EOF
-
-  chmod 755 ${startdir}/pkg/usr/bin/pynche
+  install -m755 ${srcdir}/pynche-launcher ${pkgdir}/usr/bin/pynche
   rm -f Tools/pynche/*.pyw
-  cp -r Tools/pynche ${startdir}/pkg/usr/lib/python${_pybasever}/site-packages/
+  cp -r Tools/pynche ${pkgdir}/usr/lib/python${_pybasever}/site-packages/
 
   #gettext
-  install -m755 Tools/i18n/pygettext.py ${startdir}/pkg/usr/bin/
-  install -m755 Tools/i18n/msgfmt.py ${startdir}/pkg/usr/bin/
+  install -m755 Tools/i18n/pygettext.py ${pkgdir}/usr/bin/
+  install -m755 Tools/i18n/msgfmt.py ${pkgdir}/usr/bin/
 
-  mkdir -p ${startdir}/pkg/usr/lib/python${_pybasever}/Tools/scripts
-  install Tools/scripts/README ${startdir}/pkg/usr/lib/python${_pybasever}/Tools/scripts/
-  install Tools/scripts/*py ${startdir}/pkg/usr/lib/python${_pybasever}/Tools/scripts/
+  mkdir -p ${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts
+  install Tools/scripts/README ${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/
+  install Tools/scripts/*py ${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/
 
   # license
-  install -D -m644 LICENSE ${startdir}/pkg/usr/share/licenses/${pkgname}/LICENSE
+  install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
 }

Added: Python-2.5.2-idlelib.patch
===================================================================
--- Python-2.5.2-idlelib.patch	                        (rev 0)
+++ Python-2.5.2-idlelib.patch	2008-06-25 13:06:41 UTC (rev 3576)
@@ -0,0 +1,17 @@
+--- Lib/idlelib/WidgetRedirector.py.orig	2008-04-23 23:39:57.000000000 -0700
++++ Lib/idlelib/WidgetRedirector.py	2008-04-23 23:46:55.000000000 -0700
+@@ -53,7 +53,13 @@
+             if m:
+                 return m(*args)
+             else:
+-                return self.tk.call((self.orig, cmd) + args)
++                #return self.tk.call((self.orig, cmd) + args)
++                r = self.tk.call((self.orig, cmd) + args)
++                if isinstance(r, tuple):
++                    # convert to string ourselves so we get a Tcl list
++                    # that can be converted back into a tuple
++                    r = ' '.join(map(str, r))
++                return r
+         except TclError:
+             return ""
+ 

Added: modulator-launcher
===================================================================
--- modulator-launcher	                        (rev 0)
+++ modulator-launcher	2008-06-25 13:06:41 UTC (rev 3576)
@@ -0,0 +1,2 @@
+#!/bin/bash
+exec /usr/lib/python2.5/site-packages/modulator/modulator.py

Added: pynche-launcher
===================================================================
--- pynche-launcher	                        (rev 0)
+++ pynche-launcher	2008-06-25 13:06:41 UTC (rev 3576)
@@ -0,0 +1,3 @@
+#!/bin/bash
+/usr/lib/python2.5/site-packages/pynche/pynche
+

Added: python.install
===================================================================
--- python.install	                        (rev 0)
+++ python.install	2008-06-25 13:06:41 UTC (rev 3576)
@@ -0,0 +1,13 @@
+post_install() {
+  cat << _EOF
+
+==> Python requires "tk" to use IDLE, pynche and modulator
+
+_EOF
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+# vim:set ts=2 sw=2 et:





More information about the arch-commits mailing list