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

Allan McRae allan at archlinux.org
Tue Aug 17 12:25:05 UTC 2010


    Date: Tuesday, August 17, 2010 @ 08:25:04
  Author: allan
Revision: 87617

upgpkg: python 3.1.2-1
python 2->3

Added:
  python/trunk/python-internal-expat.patch
Modified:
  python/trunk/PKGBUILD
Deleted:
  python/trunk/modulator-launcher
  python/trunk/pynche-launcher
  python/trunk/python-2.6-db-4.8.patch
  python/trunk/python-2.6-internal-expat.patch

---------------------------------+
 PKGBUILD                        |   77 ++++++++---------------
 modulator-launcher              |    2 
 pynche-launcher                 |    3 
 python-2.6-db-4.8.patch         |  123 --------------------------------------
 python-2.6-internal-expat.patch |   33 ----------
 python-internal-expat.patch     |   33 ++++++++++
 6 files changed, 61 insertions(+), 210 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-08-17 12:19:35 UTC (rev 87616)
+++ PKGBUILD	2010-08-17 12:25:04 UTC (rev 87617)
@@ -3,70 +3,49 @@
 # Contributer: Jason Chu <jason at archlinux.org>
 
 pkgname=python
-pkgver=2.6.5
-pkgrel=3
-_pybasever=2.6
-pkgdesc="A high-level scripting language"
+pkgver=3.1.2
+pkgrel=1
+_pybasever=3.1
+pkgdesc="Next generation of the python high-level scripting language"
 arch=('i686' 'x86_64')
-license=('PSF')
+license=('custom')
 url="http://www.python.org"
-depends=('db>=4.8' 'bzip2' 'gdbm' 'openssl' 'zlib' 'expat' 'sqlite3')
-makedepends=('tk>=8.5.0')
-optdepends=('tk: for IDLE, pynche and modulator')
-provides=('python2' 'python-elementtree' 'python-ctypes')
-replaces=('python-elementtree' 'python-ctypes')
+depends=('expat' 'bzip2' 'gdbm' 'openssl' 'zlib')
+makedepends=('tk' 'sqlite3')
+#optdepends=('tk: for tkinter')
 source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.bz2
-	python-2.6-internal-expat.patch
-	python-2.6-db-4.8.patch
-	modulator-launcher
-	pynche-launcher)
-md5sums=('6bef0417e71a1a1737ccf5750420fdb3'
-         '993800dbcc0c4f199c1ceee998a06e71'
-         '10eb5449ead95b9cb13eae9f9a65894e'
-         'b4a531570415280dc406c8d5c1fa8d83'
-         '9f731b9033db285132a3524fb36409e7')
+        python-internal-expat.patch)
+md5sums=('45350b51b58a46b029fb06c61257e350'
+         '993800dbcc0c4f199c1ceee998a06e71')
 
 build() {
   cd ${srcdir}/Python-${pkgver}
 
-  patch -Np0 -i ${srcdir}/python-2.6-internal-expat.patch
+  patch -Np0 -i ${srcdir}/python-internal-expat.patch
 
-  #http://bugs.python.org/issue6949
-  patch -Np0 -i ${srcdir}/python-2.6-db-4.8.patch
-
   export OPT="${CFLAGS}"
-  ./configure --prefix=/usr --enable-shared --with-threads --enable-unicode
+  ./configure --prefix=/usr --enable-shared --with-threads --with-computed-gotos \
+              --enable-unicode --with-wide-unicode
 
-  make || return 1
+  make
+}
+
+package() {
+  cd ${srcdir}/Python-${pkgver}
   make DESTDIR=${pkgdir} install
 
-  rm ${pkgdir}/usr/bin/python
-  ln -sf python${_pybasever} ${pkgdir}/usr/bin/python
-  ln -sf python${_pybasever} ${pkgdir}/usr/bin/python2
+  # why are these not done by default...
+  ln -sf python3 ${pkgdir}/usr/bin/python
+  ln -sf python3-config ${pkgdir}/usr/bin/python-config
+  ln -sf idle3 ${pkgdir}/usr/bin/idle
+  ln -sf pydoc3 ${pkgdir}/usr/bin/pydoc
 
-  ln -sf ../../libpython${_pybasever}.so \
-    ${pkgdir}/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so
+  # clean-up reference to build directory
+  sed -i "s#$srcdir/Python-${pkgver}:##" $pkgdir/usr/lib/python3.1/config/Makefile
 
-  # Install the tools
-  #modulator
-  sed -i "s#%%PYBASEVER%%#${_pybasever}#" ${srcdir}/modulator-launcher
-  install -m755 ${srcdir}/modulator-launcher ${pkgdir}/usr/bin/modulator
-  cp -r Tools/modulator ${pkgdir}/usr/lib/python${_pybasever}/site-packages/
+  # Fix conflicts with python2 - python2 version is newer...
+  rm ${pkgdir}/usr/bin/2to3
 
-  #pynche
-  sed -i "s#%%PYBASEVER%%#${_pybasever}#" ${srcdir}/pynche-launcher
-  install -m755 ${srcdir}/pynche-launcher ${pkgdir}/usr/bin/pynche
-  rm -f Tools/pynche/*.pyw
-  cp -r Tools/pynche ${pkgdir}/usr/lib/python${_pybasever}/site-packages/
-
-  #gettext
-  install -m755 Tools/i18n/pygettext.py ${pkgdir}/usr/bin/
-  install -m755 Tools/i18n/msgfmt.py ${pkgdir}/usr/bin/
-
-  mkdir -p ${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts
-  install -m644 Tools/scripts/README ${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/
-  install -m755 Tools/scripts/*py ${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/
-
   # license
   install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
 }

Deleted: modulator-launcher
===================================================================
--- modulator-launcher	2010-08-17 12:19:35 UTC (rev 87616)
+++ modulator-launcher	2010-08-17 12:25:04 UTC (rev 87617)
@@ -1,2 +0,0 @@
-#!/bin/bash
-exec /usr/lib/python%%PYBASEVER%%/site-packages/modulator/modulator.py

Deleted: pynche-launcher
===================================================================
--- pynche-launcher	2010-08-17 12:19:35 UTC (rev 87616)
+++ pynche-launcher	2010-08-17 12:25:04 UTC (rev 87617)
@@ -1,3 +0,0 @@
-#!/bin/bash
-/usr/lib/python%%PYBASEVER%%/site-packages/pynche/pynche
-

Deleted: python-2.6-db-4.8.patch
===================================================================
--- python-2.6-db-4.8.patch	2010-08-17 12:19:35 UTC (rev 87616)
+++ python-2.6-db-4.8.patch	2010-08-17 12:25:04 UTC (rev 87617)
@@ -1,123 +0,0 @@
-Index: setup.py
-===================================================================
---- setup.py	(revision 74955)
-+++ setup.py	(working copy)
-@@ -695,7 +695,7 @@
-         # a release.  Most open source OSes come with one or more
-         # versions of BerkeleyDB already installed.
- 
--        max_db_ver = (4, 7)
-+        max_db_ver = (4, 8)
-         min_db_ver = (3, 3)
-         db_setup_debug = False   # verbose debug prints from this script?
- 
-Index: Modules/_bsddb.c
-===================================================================
---- Modules/_bsddb.c	(revision 74955)
-+++ Modules/_bsddb.c	(working copy)
-@@ -215,7 +215,11 @@
- #define	DB_BUFFER_SMALL		ENOMEM
- #endif
- 
-+#if (DBVER < 48)
-+#define DB_GID_SIZE DB_XIDDATASIZE
-+#endif
- 
-+
- /* --------------------------------------------------------------------- */
- /* Structure definitions */
- 
-@@ -4501,7 +4505,11 @@
-     DBTxnObject *txn;
- #define PREPLIST_LEN 16
-     DB_PREPLIST preplist[PREPLIST_LEN];
-+#if (DBVER < 48)
-     long retp;
-+#else
-+    u_int32_t retp;
-+#endif
- 
-     CHECK_ENV_NOT_CLOSED(self);
- 
-@@ -4522,7 +4530,7 @@
-         flags=DB_NEXT;  /* Prepare for next loop pass */
-         for (i=0; i<retp; i++) {
-             gid=PyBytes_FromStringAndSize((char *)(preplist[i].gid),
--                                DB_XIDDATASIZE);
-+                                DB_GID_SIZE);
-             if (!gid) {
-                 Py_DECREF(list);
-                 return NULL;
-@@ -5047,6 +5055,7 @@
- }
- 
- 
-+#if (DBVER < 48)
- static PyObject*
- DBEnv_set_rpc_server(DBEnvObject* self, PyObject* args, PyObject* kwargs)
- {
-@@ -5068,6 +5077,7 @@
-     RETURN_IF_ERR();
-     RETURN_NONE();
- }
-+#endif
- 
- static PyObject*
- DBEnv_set_verbose(DBEnvObject* self, PyObject* args)
-@@ -5947,9 +5957,9 @@
-     if (!PyArg_ParseTuple(args, "s#:prepare", &gid, &gid_size))
-         return NULL;
- 
--    if (gid_size != DB_XIDDATASIZE) {
-+    if (gid_size != DB_GID_SIZE) {
-         PyErr_SetString(PyExc_TypeError,
--                        "gid must be DB_XIDDATASIZE bytes long");
-+                        "gid must be DB_GID_SIZE bytes long");
-         return NULL;
-     }
- 
-@@ -6539,8 +6549,10 @@
- #endif
-     {"set_get_returns_none",(PyCFunction)DBEnv_set_get_returns_none, METH_VARARGS},
-     {"txn_recover",     (PyCFunction)DBEnv_txn_recover,       METH_NOARGS},
-+#if (DBVER < 48)
-     {"set_rpc_server",  (PyCFunction)DBEnv_set_rpc_server,
-         METH_VARARGS||METH_KEYWORDS},
-+#endif
-     {"set_verbose",     (PyCFunction)DBEnv_set_verbose,       METH_VARARGS},
- #if (DBVER >= 42)
-     {"get_verbose",     (PyCFunction)DBEnv_get_verbose,       METH_VARARGS},
-@@ -7089,6 +7101,7 @@
-     ADD_INT(d, DB_MAX_PAGES);
-     ADD_INT(d, DB_MAX_RECORDS);
- 
-+#if (DBVER < 48)
- #if (DBVER >= 42)
-     ADD_INT(d, DB_RPCCLIENT);
- #else
-@@ -7096,7 +7109,11 @@
-     /* allow apps to be written using DB_RPCCLIENT on older Berkeley DB */
-     _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT);
- #endif
-+#endif
-+
-+#if (DBVER < 48)
-     ADD_INT(d, DB_XA_CREATE);
-+#endif
- 
-     ADD_INT(d, DB_CREATE);
-     ADD_INT(d, DB_NOMMAP);
-@@ -7113,7 +7130,13 @@
-     ADD_INT(d, DB_INIT_TXN);
-     ADD_INT(d, DB_JOINENV);
- 
-+#if (DBVER >= 48)
-+    ADD_INT(d, DB_GID_SIZE);
-+#else
-     ADD_INT(d, DB_XIDDATASIZE);
-+    /* Allow new code to work in old BDB releases */
-+    _addIntToDict(d, "DB_GID_SIZE", DB_XIDDATASIZE);
-+#endif
- 
-     ADD_INT(d, DB_RECOVER);
-     ADD_INT(d, DB_RECOVER_FATAL);

Deleted: python-2.6-internal-expat.patch
===================================================================
--- python-2.6-internal-expat.patch	2010-08-17 12:19:35 UTC (rev 87616)
+++ python-2.6-internal-expat.patch	2010-08-17 12:25:04 UTC (rev 87617)
@@ -1,33 +0,0 @@
---- setup.py    2008-04-22 12:12:24.613554757 +0300
-+++ setup.py    2008-04-22 12:13:09.276544063 +0300
-@@ -1035,18 +1035,15 @@
-         #
-         # More information on Expat can be found at www.libexpat.org.
-         #
--        expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
--        define_macros = [
--            ('HAVE_EXPAT_CONFIG_H', '1'),
--        ]
-+        # Use system expat
-+        expatinc = '/usr/include'
-+        define_macros = []
-
-         exts.append(Extension('pyexpat',
-                               define_macros = define_macros,
-                               include_dirs = [expatinc],
-+                              libraries = ['expat'],
-                               sources = ['pyexpat.c',
--                                         'expat/xmlparse.c',
--                                         'expat/xmlrole.c',
--                                         'expat/xmltok.c',
-                                          ],
-                               ))
-
-@@ -1058,6 +1055,7 @@
-             exts.append(Extension('_elementtree',
-                                   define_macros = define_macros,
-                                   include_dirs = [expatinc],
-+                                  libraries = ['expat'],
-                                   sources = ['_elementtree.c'],
-                                   ))
-

Added: python-internal-expat.patch
===================================================================
--- python-internal-expat.patch	                        (rev 0)
+++ python-internal-expat.patch	2010-08-17 12:25:04 UTC (rev 87617)
@@ -0,0 +1,33 @@
+--- setup.py    2008-04-22 12:12:24.613554757 +0300
++++ setup.py    2008-04-22 12:13:09.276544063 +0300
+@@ -1035,18 +1035,15 @@
+         #
+         # More information on Expat can be found at www.libexpat.org.
+         #
+-        expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
+-        define_macros = [
+-            ('HAVE_EXPAT_CONFIG_H', '1'),
+-        ]
++        # Use system expat
++        expatinc = '/usr/include'
++        define_macros = []
+
+         exts.append(Extension('pyexpat',
+                               define_macros = define_macros,
+                               include_dirs = [expatinc],
++                              libraries = ['expat'],
+                               sources = ['pyexpat.c',
+-                                         'expat/xmlparse.c',
+-                                         'expat/xmlrole.c',
+-                                         'expat/xmltok.c',
+                                          ],
+                               ))
+
+@@ -1058,6 +1055,7 @@
+             exts.append(Extension('_elementtree',
+                                   define_macros = define_macros,
+                                   include_dirs = [expatinc],
++                                  libraries = ['expat'],
+                                   sources = ['_elementtree.c'],
+                                   ))
+




More information about the arch-commits mailing list