[oe-commits] org.oe.dev python 2.5.1 enable and package ctypes module/package. closes #3368 -- thanks emdete!

mickeyl commit openembedded-commits at lists.openembedded.org
Wed Dec 5 17:43:17 UTC 2007


python 2.5.1 enable and package ctypes module/package. closes #3368 -- thanks emdete!

Author: mickeyl at openembedded.org
Branch: org.openembedded.dev
Revision: 0fb6c6e17d53f8f9619779a7259b3225d01cf28d
ViewMTN: http://monotone.openembedded.org/revision/info/0fb6c6e17d53f8f9619779a7259b3225d01cf28d
Files:
1
packages/python/python-2.5.1/enable-ctypes-module.patch
contrib/python/generate-manifest-2.5.py
packages/python/python-2.5-manifest.inc
packages/python/python_2.5.1.bb
Diffs:

#
# mt diff -r845f49b0e5101d01ff3a9d4a719e55ed6b8f60bc -r0fb6c6e17d53f8f9619779a7259b3225d01cf28d
#
# 
# 
# add_file "packages/python/python-2.5.1/enable-ctypes-module.patch"
#  content [fcdbe615e5967af46ce02747bce2fdec7aa32063]
# 
# patch "contrib/python/generate-manifest-2.5.py"
#  from [e2e4d8c66dd9b6732679d4586d43d433b78c9fde]
#    to [f768218da4136ae607054f3c46f08ce296c06475]
# 
# patch "packages/python/python-2.5-manifest.inc"
#  from [fe601293378798fbe52a39d55b428fecec3fa1f5]
#    to [310d5b976333bfad4ed4517dcf5756b428282424]
# 
# patch "packages/python/python_2.5.1.bb"
#  from [e1aab59299568cfc19d5379dc80703a639cbd155]
#    to [be4656d29bd3d98990716fee77c71ef69a758a2d]
# 
============================================================
--- packages/python/python-2.5.1/enable-ctypes-module.patch	fcdbe615e5967af46ce02747bce2fdec7aa32063
+++ packages/python/python-2.5.1/enable-ctypes-module.patch	fcdbe615e5967af46ce02747bce2fdec7aa32063
@@ -0,0 +1,106 @@
+diff -Naur Python-2.5.1.orig/setup.py Python-2.5.1/setup.py
+--- Python-2.5.orig/setup.py	2006-08-10 01:42:18.000000000 +0200
++++ Python-2.5/setup.py	2007-11-21 18:00:43.000000000 +0100
+@@ -1321,16 +1329,16 @@
+                                          ffi_configfile):
+                 from distutils.dir_util import mkpath
+                 mkpath(ffi_builddir)
+-                config_args = []
++                config_args = ['--host=%s' % os.environ["HOST_SYS"], ]
+ 
+                 # Pass empty CFLAGS because we'll just append the resulting
+                 # CFLAGS to Python's; -g or -O2 is to be avoided.
+-                cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
+-                      % (ffi_builddir, ffi_srcdir, " ".join(config_args))
++                cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \
++                      % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args))
+ 
+                 res = os.system(cmd)
+                 if res or not os.path.exists(ffi_configfile):
+-                    print "Failed to configure _ctypes module"
++                    print "Failed to configure _ctypes module, ret %d or missing %s"% (res, ffi_configfile, )
+                     return False
+ 
+             fficonfig = {}
+diff -Naur Python-2.5.1.orig/Modules/_ctypes/callbacks.c Python-2.5.1/Modules/_ctypes/callbacks.c
+--- Python-2.5.1.orig/Modules/_ctypes/callbacks.c	2006-10-17 21:41:10.000000000 +0200
++++ Python-2.5.1/Modules/_ctypes/callbacks.c	2007-11-22 10:29:33.000000000 +0100
+@@ -273,11 +273,13 @@
+ 		PyErr_NoMemory();
+ 		return NULL;
+ 	}
++#if FFI_CLOSURES
+ 	p->pcl = MallocClosure();
+ 	if (p->pcl == NULL) {
+ 		PyErr_NoMemory();
+ 		goto error;
+ 	}
++#endif
+ 
+ 	for (i = 0; i < nArgs; ++i) {
+ 		PyObject *cnv = PySequence_GetItem(converters, i);
+@@ -315,12 +317,14 @@
+ 			     "ffi_prep_cif failed with %d", result);
+ 		goto error;
+ 	}
++#if FFI_CLOSURES
+ 	result = ffi_prep_closure(p->pcl, &p->cif, closure_fcn, p);
+ 	if (result != FFI_OK) {
+ 		PyErr_Format(PyExc_RuntimeError,
+ 			     "ffi_prep_closure failed with %d", result);
+ 		goto error;
+ 	}
++#endif
+ 
+ 	p->converters = converters;
+ 	p->callable = callable;
+@@ -328,8 +332,10 @@
+ 
+   error:
+ 	if (p) {
++#if FFI_CLOSURES
+ 		if (p->pcl)
+ 			FreeClosure(p->pcl);
++#endif
+ 		PyMem_Free(p);
+ 	}
+ 	return NULL;
+diff -Naur Python-2.5.1.orig/Modules/_ctypes/_ctypes.c Python-2.5.1/Modules/_ctypes/_ctypes.c
+--- Python-2.5.1.orig/Modules/_ctypes/_ctypes.c	2007-03-23 20:56:45.000000000 +0100
++++ Python-2.5.1/Modules/_ctypes/_ctypes.c	2007-11-22 10:29:01.000000000 +0100
+@@ -3419,7 +3419,9 @@
+ 	Py_CLEAR(self->paramflags);
+ 
+ 	if (self->thunk) {
++#if FFI_CLOSURES
+ 		FreeClosure(self->thunk->pcl);
++#endif
+ 		PyMem_Free(self->thunk);
+ 		self->thunk = NULL;
+ 	}
+diff -Naur Python-2.5.1.orig/Modules/_ctypes/ctypes.h Python-2.5.1/Modules/_ctypes/ctypes.h
+--- Python-2.5.1.orig/Modules/_ctypes/ctypes.h	2006-08-14 13:17:48.000000000 +0200
++++ Python-2.5.1/Modules/_ctypes/ctypes.h	2007-11-22 10:29:44.000000000 +0100
+@@ -68,7 +68,9 @@
+ };
+ 
+ typedef struct {
++#if FFI_CLOSURES
+ 	ffi_closure *pcl; /* the C callable */
++#endif
+ 	ffi_cif cif;
+ 	PyObject *converters;
+ 	PyObject *callable;
+diff -Naur Python-2.5.1.orig/Modules/_ctypes/malloc_closure.c Python-2.5.1/Modules/_ctypes/malloc_closure.c
+--- Python-2.5.1.orig/Modules/_ctypes/malloc_closure.c	2006-06-12 22:56:48.000000000 +0200
++++ Python-2.5.1/Modules/_ctypes/malloc_closure.c	2007-11-22 10:30:17.000000000 +0100
+@@ -27,7 +27,9 @@
+ /******************************************************************/
+ 
+ typedef union _tagITEM {
++#if FFI_CLOSURES
+ 	ffi_closure closure;
++#endif
+ 	union _tagITEM *next;
+ } ITEM;
+ 
============================================================
--- contrib/python/generate-manifest-2.5.py	e2e4d8c66dd9b6732679d4586d43d433b78c9fde
+++ contrib/python/generate-manifest-2.5.py	f768218da4136ae607054f3c46f08ce296c06475
@@ -1,8 +1,9 @@
 #!/usr/bin/env python
 
 # generate Python Manifest for the OpenEmbedded build system
 # (C) 2002-2007 Michael 'Mickey' Lauer <mlauer at vanille-media.de>
-# MIT license
+# (C) 2007 Jeremy Laine
+# licensed under MIT, see COPYING.MIT
 
 import os
 import sys
@@ -10,10 +11,10 @@ VERSION = "2.5.1"
 
 VERSION = "2.5.1"
 # increase when touching python-core, this should be the same ml version as in python_2.5.1.bb
-BASEREV = 2
+BASEREV = 3
 
 __author__ = "Michael 'Mickey' Lauer <mickey at Vanille.de>"
-__version__ = "20070823"
+__version__ = "20071205"
 
 class MakefileMaker:
 
@@ -194,8 +195,11 @@ if __name__ == "__main__":
     "lib-dynload/_csv.so csv.* optparse.* textwrap.*" )
 
     m.addPackage( 0, "python-curses", "Python Curses Support", "python-core",
-    "curses lib-dynload/_curses.so lib-dynload/_curses_panel.so" ) # package
+    "curses lib-dynload/_curses.so lib-dynload/_curses_panel.so" ) # directory + low level module
 
+    m.addPackage( 0, "python-ctypes", "Python C Types Support", "python-core",
+    "ctypes lib-dynload/_ctypes.so" ) # directory + low level module
+
     m.addPackage( 0, "python-datetime", "Python Calendar and Time support", "python-core python-codecs",
     "_strptime.* calendar.* lib-dynload/datetime.so" )
 
============================================================
--- packages/python/python-2.5-manifest.inc	fe601293378798fbe52a39d55b428fecec3fa1f5
+++ packages/python/python-2.5-manifest.inc	310d5b976333bfad4ed4517dcf5756b428282424
@@ -1,5 +1,5 @@
 ########################################################################################################################
-### AUTO-GENERATED by 'contrib/python/generate-manifest-2.5.py' [(C) 2002-2007 Michael 'Mickey' Lauer <mlauer at vanille-media.de>] on Thu Nov 15 16:11:01 2007
+### AUTO-GENERATED by './generate-manifest-2.5.py' [(C) 2002-2007 Michael 'Mickey' Lauer <mlauer at vanille-media.de>] on Wed Dec  5 18:00:46 2007
 ###
 ### Visit THE Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
 ###
@@ -8,287 +8,292 @@
 ########################################################################################################################
  
 
-PROVIDES+="python-profile python-threading python-distutils python-textutils python-codecs python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-core-dbg python-resource python-devel python-math python-hotshot python-unixadmin python-syslog python-tkinter python-gdbm python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-tests python-unittest python-stringold python-robotparser python-lib-old-and-deprecated python-compile python-debugger python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
+PROVIDES+="python-profile python-threading python-distutils python-textutils python-codecs python-ctypes python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-core-dbg python-resource python-devel python-math python-hotshot python-unixadmin python-syslog python-tkinter python-gdbm python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-tests python-unittest python-stringold python-robotparser python-lib-old-and-deprecated python-compile python-debugger python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
 
-PACKAGES="python-profile python-threading python-distutils python-textutils python-codecs python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-core-dbg python-resource python-devel python-math python-hotshot python-unixadmin python-syslog python-tkinter python-gdbm python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-tests python-unittest python-stringold python-robotparser python-lib-old-and-deprecated python-compile python-debugger python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
+PACKAGES="python-profile python-threading python-distutils python-textutils python-codecs python-ctypes python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-core-dbg python-resource python-devel python-math python-hotshot python-unixadmin python-syslog python-tkinter python-gdbm python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-tests python-unittest python-stringold python-robotparser python-lib-old-and-deprecated python-compile python-debugger python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
 
 DESCRIPTION_python-profile="Python Basic Profiling Support"
-PR_python-profile="ml2"
+PR_python-profile="ml3"
 RDEPENDS_python-profile="python-core"
 FILES_python-profile="${libdir}/python2.5/profile.* ${libdir}/python2.5/pstats.* "
 
 DESCRIPTION_python-threading="Python Threading & Synchronization Support"
-PR_python-threading="ml2"
+PR_python-threading="ml3"
 RDEPENDS_python-threading="python-core python-lang"
 FILES_python-threading="${libdir}/python2.5/_threading_local.* ${libdir}/python2.5/dummy_thread.* ${libdir}/python2.5/dummy_threading.* ${libdir}/python2.5/mutex.* ${libdir}/python2.5/threading.* ${libdir}/python2.5/Queue.* "
 
 DESCRIPTION_python-distutils="Python Distribution Utilities"
-PR_python-distutils="ml2"
+PR_python-distutils="ml3"
 RDEPENDS_python-distutils="python-core"
 FILES_python-distutils="${libdir}/python2.5/config ${libdir}/python2.5/distutils "
 
 DESCRIPTION_python-textutils="Python Option Parsing, Text Wrapping and Comma-Separated-Value Support"
-PR_python-textutils="ml2"
+PR_python-textutils="ml3"
 RDEPENDS_python-textutils="python-core python-io python-re python-stringold"
 FILES_python-textutils="${libdir}/python2.5/lib-dynload/_csv.so ${libdir}/python2.5/csv.* ${libdir}/python2.5/optparse.* ${libdir}/python2.5/textwrap.* "
 
 DESCRIPTION_python-codecs="Python Codecs, Encodings & i18n Support"
-PR_python-codecs="ml2"
+PR_python-codecs="ml3"
 RDEPENDS_python-codecs="python-core"
 FILES_python-codecs="${libdir}/python2.5/codecs.* ${libdir}/python2.5/encodings ${libdir}/python2.5/gettext.* ${libdir}/python2.5/locale.* ${libdir}/python2.5/lib-dynload/_locale.so ${libdir}/python2.5/lib-dynload/unicodedata.so ${libdir}/python2.5/stringprep.* ${libdir}/python2.5/xdrlib.* "
 
+DESCRIPTION_python-ctypes="Python C Types Support"
+PR_python-ctypes="ml3"
+RDEPENDS_python-ctypes="python-core"
+FILES_python-ctypes="${libdir}/python2.5/ctypes ${libdir}/python2.5/lib-dynload/_ctypes.so "
+
 DESCRIPTION_python-pickle="Python Persistence Support"
-PR_python-pickle="ml2"
+PR_python-pickle="ml3"
 RDEPENDS_python-pickle="python-core python-codecs python-io python-re"
 FILES_python-pickle="${libdir}/python2.5/pickle.* ${libdir}/python2.5/shelve.* ${libdir}/python2.5/lib-dynload/cPickle.so "
 
 DESCRIPTION_python-datetime="Python Calendar and Time support"
-PR_python-datetime="ml2"
+PR_python-datetime="ml3"
 RDEPENDS_python-datetime="python-core python-codecs"
 FILES_python-datetime="${libdir}/python2.5/_strptime.* ${libdir}/python2.5/calendar.* ${libdir}/python2.5/lib-dynload/datetime.so "
 
 DESCRIPTION_python-core="Python Interpreter and core modules (needed!)"
-PR_python-core="ml4"
+PR_python-core="ml5"
 RDEPENDS_python-core=""
 FILES_python-core="${libdir}/python2.5/__future__.* ${libdir}/python2.5/copy.* ${libdir}/python2.5/copy_reg.* ${libdir}/python2.5/ConfigParser.* ${libdir}/python2.5/getopt.* ${libdir}/python2.5/linecache.* ${libdir}/python2.5/new.* ${libdir}/python2.5/os.* ${libdir}/python2.5/posixpath.* ${libdir}/python2.5/struct.* ${libdir}/python2.5/warnings.* ${libdir}/python2.5/site.* ${libdir}/python2.5/stat.* ${libdir}/python2.5/UserDict.* ${libdir}/python2.5/UserList.* ${libdir}/python2.5/UserString.* ${libdir}/python2.5/lib-dynload/binascii.so ${libdir}/python2.5/lib-dynload/_struct.so ${libdir}/python2.5/lib-dynload/time.so ${libdir}/python2.5/lib-dynload/xreadlines.so ${libdir}/python2.5/types.* ${bindir}/python* "
 
 DESCRIPTION_python-io="Python Low-Level I/O"
-PR_python-io="ml2"
+PR_python-io="ml3"
 RDEPENDS_python-io="python-core python-math"
 FILES_python-io="${libdir}/python2.5/lib-dynload/_socket.so ${libdir}/python2.5/lib-dynload/_ssl.so ${libdir}/python2.5/lib-dynload/select.so ${libdir}/python2.5/lib-dynload/termios.so ${libdir}/python2.5/lib-dynload/cStringIO.so ${libdir}/python2.5/pipes.* ${libdir}/python2.5/socket.* ${libdir}/python2.5/tempfile.* ${libdir}/python2.5/StringIO.* "
 
 DESCRIPTION_python-compiler="Python Compiler Support"
-PR_python-compiler="ml2"
+PR_python-compiler="ml3"
 RDEPENDS_python-compiler="python-core"
 FILES_python-compiler="${libdir}/python2.5/compiler "
 
 DESCRIPTION_python-compression="Python High Level Compression Support"
-PR_python-compression="ml2"
+PR_python-compression="ml3"
 RDEPENDS_python-compression="python-core python-zlib"
 FILES_python-compression="${libdir}/python2.5/gzip.* ${libdir}/python2.5/zipfile.* "
 
 DESCRIPTION_python-re="Python Regular Expression APIs"
-PR_python-re="ml2"
+PR_python-re="ml3"
 RDEPENDS_python-re="python-core"
 FILES_python-re="${libdir}/python2.5/re.* ${libdir}/python2.5/sre.* ${libdir}/python2.5/sre_compile.* ${libdir}/python2.5/sre_constants* ${libdir}/python2.5/sre_parse.* "
 
 DESCRIPTION_python-xmlrpc="Python XMLRPC Support"
-PR_python-xmlrpc="ml2"
+PR_python-xmlrpc="ml3"
 RDEPENDS_python-xmlrpc="python-core python-xml python-netserver python-lang"
 FILES_python-xmlrpc="${libdir}/python2.5/xmlrpclib.* ${libdir}/python2.5/SimpleXMLRPCServer.* "
 
 DESCRIPTION_python-terminal="Python Terminal Controlling Support"
-PR_python-terminal="ml2"
+PR_python-terminal="ml3"
 RDEPENDS_python-terminal="python-core python-io"
 FILES_python-terminal="${libdir}/python2.5/pty.* ${libdir}/python2.5/tty.* "
 
 DESCRIPTION_python-email="Python Email Support"
-PR_python-email="ml2"
+PR_python-email="ml3"
 RDEPENDS_python-email="python-core python-io python-re python-mime python-audio python-image"
 FILES_python-email="${libdir}/python2.5/email "
 
 DESCRIPTION_python-image="Python Graphical Image Handling"
-PR_python-image="ml2"
+PR_python-image="ml3"
 RDEPENDS_python-image="python-core"
 FILES_python-image="${libdir}/python2.5/colorsys.* ${libdir}/python2.5/imghdr.* ${libdir}/python2.5/lib-dynload/imageop.so ${libdir}/python2.5/lib-dynload/rgbimg.so "
 
 DESCRIPTION_python-core-dbg="Python core module debug information"
-PR_python-core-dbg="ml2"
+PR_python-core-dbg="ml3"
 RDEPENDS_python-core-dbg="python-core"
 FILES_python-core-dbg="$%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list