* [PATCH 01/20] generate-manifest-3.3.py: Add script to generate python 3.3 manifests
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 02/20] python-3.3-manifest: Add python3 manifest file Khem Raj
` (19 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Bases on python 2.7.x generator
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
scripts/contrib/python/generate-manifest-3.3.py | 376 ++++++++++++++++++++++++
1 file changed, 376 insertions(+)
create mode 100755 scripts/contrib/python/generate-manifest-3.3.py
diff --git a/scripts/contrib/python/generate-manifest-3.3.py b/scripts/contrib/python/generate-manifest-3.3.py
new file mode 100755
index 0000000..b5ebb91
--- /dev/null
+++ b/scripts/contrib/python/generate-manifest-3.3.py
@@ -0,0 +1,376 @@
+#!/usr/bin/env python
+
+# generate Python Manifest for the OpenEmbedded build system
+# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# (C) 2007 Jeremy Laine
+# licensed under MIT, see COPYING.MIT
+#
+# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
+# * Updated to no longer generate special -dbg package, instead use the
+# single system -dbg
+# * Update version with ".1" to indicate this change
+
+import os
+import sys
+import time
+
+VERSION = "3.3.0"
+
+__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
+__version__ = "20121010"
+
+class MakefileMaker:
+
+ def __init__( self, outfile ):
+ """initialize"""
+ self.packages = {}
+ self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
+ self.output = outfile
+ self.out( """
+# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
+# Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
+""" % ( sys.argv[0], __version__ ) )
+
+ #
+ # helper functions
+ #
+
+ def out( self, data ):
+ """print a line to the output file"""
+ self.output.write( "%s\n" % data )
+
+ def setPrefix( self, targetPrefix ):
+ """set a file prefix for addPackage files"""
+ self.targetPrefix = targetPrefix
+
+ def doProlog( self ):
+ self.out( """ """ )
+ self.out( "" )
+
+ def addPackage( self, name, description, dependencies, filenames ):
+ """add a package to the Makefile"""
+ if type( filenames ) == type( "" ):
+ filenames = filenames.split()
+ fullFilenames = []
+ for filename in filenames:
+ if filename[0] != "$":
+ fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
+ else:
+ fullFilenames.append( filename )
+ self.packages[name] = description, dependencies, fullFilenames
+
+ def doBody( self ):
+ """generate body of Makefile"""
+
+ global VERSION
+
+ #
+ # generate provides line
+ #
+
+ provideLine = 'PROVIDES+="'
+ for name in sorted(self.packages):
+ provideLine += "%s " % name
+ provideLine += '"'
+
+ self.out( provideLine )
+ self.out( "" )
+
+ #
+ # generate package line
+ #
+
+ packageLine = 'PACKAGES="${PN}-dbg '
+ for name in sorted(self.packages):
+ if name.startswith("${PN}-distutils"):
+ if name == "${PN}-distutils":
+ packageLine += "%s-staticdev %s " % (name, name)
+ elif name != '${PN}-dbg':
+ packageLine += "%s " % name
+ packageLine += '${PN}-modules"'
+
+ self.out( packageLine )
+ self.out( "" )
+
+ #
+ # generate package variables
+ #
+
+ for name, data in sorted(self.packages.iteritems()):
+ desc, deps, files = data
+
+ #
+ # write out the description, revision and dependencies
+ #
+ self.out( 'DESCRIPTION_%s="%s"' % ( name, desc ) )
+ self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
+
+ line = 'FILES_%s="' % name
+
+ #
+ # check which directories to make in the temporary directory
+ #
+
+ dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
+ for target in files:
+ dirset[os.path.dirname( target )] = True
+
+ #
+ # generate which files to copy for the target (-dfR because whole directories are also allowed)
+ #
+
+ for target in files:
+ line += "%s " % target
+
+ line += '"'
+ self.out( line )
+ self.out( "" )
+
+ self.out( 'DESCRIPTION_${PN}-modules="All Python modules"' )
+ line = 'RDEPENDS_${PN}-modules="'
+
+ for name, data in sorted(self.packages.iteritems()):
+ if name not in ['${PN}-dev', '${PN}-distutils-staticdev']:
+ line += "%s " % name
+
+ self.out( "%s \"" % line )
+ self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
+
+ def doEpilog( self ):
+ self.out( """""" )
+ self.out( "" )
+
+ def make( self ):
+ self.doProlog()
+ self.doBody()
+ self.doEpilog()
+
+if __name__ == "__main__":
+
+ if len( sys.argv ) > 1:
+ try:
+ os.unlink(sys.argv[1])
+ except Exception:
+ sys.exc_clear()
+ outfile = file( sys.argv[1], "w" )
+ else:
+ outfile = sys.stdout
+
+ m = MakefileMaker( outfile )
+
+ # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
+ # Parameters: revision, name, description, dependencies, filenames
+ #
+
+ m.addPackage( "${PN}-core", "Python Interpreter and core modules (needed!)", "${PN}-lang ${PN}-re",
+ "__future__.* _abcoll.* abc.* copy.* copy_reg.* ConfigParser.* " +
+ "genericpath.* getopt.* linecache.* new.* " +
+ "os.* posixpath.* struct.* " +
+ "warnings.* site.* stat.* " +
+ "UserDict.* UserList.* UserString.* " +
+ "lib-dynload/binascii.*.so lib-dynload/_struct.*.so lib-dynload/time.*.so " +
+ "lib-dynload/xreadlines.*.so types.* platform.* ${bindir}/python* " +
+ "_weakrefset.* sysconfig.* config/Makefile " +
+ "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " +
+ "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
+
+ m.addPackage( "${PN}-dev", "Python Development Package", "${PN}-core",
+ "${includedir} " +
+ "${libdir}/lib*${SOLIBSDEV} " +
+ "${libdir}/*.la " +
+ "${libdir}/*.a " +
+ "${libdir}/*.o " +
+ "${libdir}/pkgconfig " +
+ "${base_libdir}/*.a " +
+ "${base_libdir}/*.o " +
+ "${datadir}/aclocal " +
+ "${datadir}/pkgconfig " )
+
+ m.addPackage( "${PN}-2to3", "Python Automated Python 2 to 3 code translation", "${PN}-core",
+ "${bindir}/2to3 lib2to3" ) # package
+
+ m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
+ "${bindir}/idle idlelib" ) # package
+
+ m.addPackage( "${PN}-pydoc", "Python Interactive Help Support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
+ "${bindir}/pydoc pydoc.* pydoc_data" )
+
+ m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
+ "${bindir}/smtpd.* smtpd.*" )
+
+ m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
+ "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.*.so lib-dynload/audioop.*.so audiodev.* sunaudio.* sunau.* toaiff.*" )
+
+ m.addPackage( "${PN}-codecs", "Python Codecs, Encodings & i18n Support", "${PN}-core ${PN}-lang",
+ "codecs.* encodings gettext.* locale.* lib-dynload/_locale.*.so lib-dynload/_codecs* lib-dynload/_multibytecodec.*.so lib-dynload/unicodedata.*.so stringprep.* xdrlib.*" )
+
+ m.addPackage( "${PN}-compile", "Python Bytecode Compilation Support", "${PN}-core",
+ "py_compile.* compileall.*" )
+
+ m.addPackage( "${PN}-compression", "Python High Level Compression Support", "${PN}-core ${PN}-codecs",
+ "gzip.* zipfile.* tarfile.* lib-dynload/bz2.*.so" )
+
+ m.addPackage( "${PN}-crypt", "Python Basic Cryptographic and Hashing Support", "${PN}-core",
+ "hashlib.* md5.* sha.* lib-dynload/crypt.*.so lib-dynload/_hashlib.*.so lib-dynload/_sha256.*.so lib-dynload/_sha512.*.so" )
+
+ m.addPackage( "${PN}-textutils", "Python Option Parsing, Text Wrapping and Comma-Separated-Value Support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
+ "lib-dynload/_csv.*.so csv.* optparse.* textwrap.*" )
+
+ m.addPackage( "${PN}-curses", "Python Curses Support", "${PN}-core",
+ "curses lib-dynload/_curses.*.so lib-dynload/_curses_panel.*.so" ) # directory + low level module
+
+ m.addPackage( "${PN}-ctypes", "Python C Types Support", "${PN}-core",
+ "ctypes lib-dynload/_ctypes.*.so lib-dynload/_ctypes_test.*.so" ) # directory + low level module
+
+ m.addPackage( "${PN}-datetime", "Python Calendar and Time support", "${PN}-core ${PN}-codecs",
+ "_strptime.* calendar.* lib-dynload/datetime.*.so" )
+
+ m.addPackage( "${PN}-db", "Python File-Based Database Support", "${PN}-core",
+ "anydbm.* dumbdbm.* whichdb.* dbm lib-dynload/_dbm.*.so" )
+
+ m.addPackage( "${PN}-debugger", "Python Debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint",
+ "bdb.* pdb.*" )
+
+ m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects.", "${PN}-lang ${PN}-re",
+ "difflib.*" )
+
+ m.addPackage( "${PN}-distutils-staticdev", "Python Distribution Utilities (Static Libraries)", "${PN}-distutils",
+ "config/lib*.a" ) # package
+
+ m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core",
+ "config distutils" ) # package
+
+ m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings.", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
+ "doctest.*" )
+
+ # FIXME consider adding to some higher level package
+ m.addPackage( "${PN}-elementtree", "Python elementree", "${PN}-core",
+ "lib-dynload/_elementtree.*.so" )
+
+ m.addPackage( "${PN}-email", "Python Email Support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
+ "imaplib.* email" ) # package
+
+ m.addPackage( "${PN}-fcntl", "Python's fcntl Interface", "${PN}-core",
+ "lib-dynload/fcntl.*.so" )
+
+ m.addPackage( "${PN}-html", "Python HTML Processing", "${PN}-core",
+ "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
+
+ m.addPackage( "${PN}-gdbm", "Python GNU Database Support", "${PN}-core",
+ "lib-dynload/_gdbm.*.so" )
+
+ m.addPackage( "${PN}-image", "Python Graphical Image Handling", "${PN}-core",
+ "colorsys.* imghdr.* lib-dynload/imageop.*.so lib-dynload/rgbimg.*.so" )
+
+ m.addPackage( "${PN}-io", "Python Low-Level I/O", "${PN}-core ${PN}-math",
+ "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " +
+ "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
+
+ m.addPackage( "${PN}-json", "Python JSON Support", "${PN}-core ${PN}-math ${PN}-re",
+ "json lib-dynload/_json.*.so" ) # package
+
+ m.addPackage( "${PN}-lang", "Python Low-Level Language Support", "${PN}-core",
+ "lib-dynload/_bisect.*.so lib-dynload/_collections.*.so lib-dynload/_heapq.*.so lib-dynload/_weakref.*.so lib-dynload/_functools.*.so " +
+ "lib-dynload/array.*.so lib-dynload/itertools.*.so lib-dynload/operator.*.so lib-dynload/parser.*.so " +
+ "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* repr.* token.* " +
+ "tokenize.* traceback.* weakref.*" )
+
+ m.addPackage( "${PN}-logging", "Python Logging Support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
+ "logging" ) # package
+
+ m.addPackage( "${PN}-mailbox", "Python Mailbox Format Support", "${PN}-core ${PN}-mime",
+ "mailbox.*" )
+
+ m.addPackage( "${PN}-math", "Python Math Support", "${PN}-core",
+ "lib-dynload/cmath.*.so lib-dynload/math.*.so lib-dynload/_random.*.so random.* sets.*" )
+
+ m.addPackage( "${PN}-mime", "Python MIME Handling APIs", "${PN}-core ${PN}-io",
+ "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
+
+ m.addPackage( "${PN}-mmap", "Python Memory-Mapped-File Support", "${PN}-core ${PN}-io",
+ "lib-dynload/mmap.*.so " )
+
+ m.addPackage( "${PN}-multiprocessing", "Python Multiprocessing Support", "${PN}-core ${PN}-io ${PN}-lang",
+ "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package
+
+ m.addPackage( "${PN}-netclient", "Python Internet Protocol Clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime",
+ "*Cookie*.* " +
+ "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib.* urllib2.* urlparse.* uuid.* rfc822.* mimetools.*" )
+
+ m.addPackage( "${PN}-netserver", "Python Internet Protocol Servers", "${PN}-core ${PN}-netclient",
+ "cgi.* *HTTPServer.* SocketServer.*" )
+
+ m.addPackage( "${PN}-numbers", "Python Number APIs", "${PN}-core ${PN}-lang ${PN}-re",
+ "decimal.* numbers.*" )
+
+ m.addPackage( "${PN}-pickle", "Python Persistence Support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
+ "pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" )
+
+ m.addPackage( "${PN}-pkgutil", "Python Package Extension Utility Support", "${PN}-core",
+ "pkgutil.*")
+
+ m.addPackage( "${PN}-pprint", "Python Pretty-Print Support", "${PN}-core",
+ "pprint.*" )
+
+ m.addPackage( "${PN}-profile", "Python Basic Profiling Support", "${PN}-core ${PN}-textutils",
+ "profile.* pstats.* cProfile.* lib-dynload/_lsprof.*.so" )
+
+ m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
+ "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
+
+ m.addPackage( "${PN}-readline", "Python Readline Support", "${PN}-core",
+ "lib-dynload/readline.*.so rlcompleter.*" )
+
+ m.addPackage( "${PN}-resource", "Python Resource Control Interface", "${PN}-core",
+ "lib-dynload/resource.*.so" )
+
+ m.addPackage( "${PN}-shell", "Python Shell-Like Functionality", "${PN}-core ${PN}-re",
+ "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
+
+ m.addPackage( "${PN}-robotparser", "Python robots.txt parser", "${PN}-core ${PN}-netclient",
+ "urllib/robotparser.*")
+
+ m.addPackage( "${PN}-subprocess", "Python Subprocess Support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle",
+ "subprocess.*" )
+
+ m.addPackage( "${PN}-sqlite3", "Python Sqlite3 Database Support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading",
+ "lib-dynload/_sqlite3.*.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
+
+ m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 Database Support Tests", "${PN}-core ${PN}-sqlite3",
+ "sqlite3/test" )
+
+ m.addPackage( "${PN}-stringold", "Python String APIs [deprecated]", "${PN}-core ${PN}-re",
+ "lib-dynload/strop.*.so string.* stringold.*" )
+
+ m.addPackage( "${PN}-syslog", "Python Syslog Interface", "${PN}-core",
+ "lib-dynload/syslog.*.so" )
+
+ m.addPackage( "${PN}-terminal", "Python Terminal Controlling Support", "${PN}-core ${PN}-io",
+ "pty.* tty.*" )
+
+ m.addPackage( "${PN}-tests", "Python Tests", "${PN}-core",
+ "test" ) # package
+
+ m.addPackage( "${PN}-threading", "Python Threading & Synchronization Support", "${PN}-core ${PN}-lang",
+ "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" )
+
+ m.addPackage( "${PN}-tkinter", "Python Tcl/Tk Bindings", "${PN}-core",
+ "lib-dynload/_tkinter.*.so lib-tk tkinter" ) # package
+
+ m.addPackage( "${PN}-unittest", "Python Unit Testing Framework", "${PN}-core ${PN}-stringold ${PN}-lang",
+ "unittest/" )
+
+ m.addPackage( "${PN}-unixadmin", "Python Unix Administration Support", "${PN}-core",
+ "lib-dynload/nis.*.so lib-dynload/grp.*.so lib-dynload/pwd.*.so getpass.*" )
+
+ m.addPackage( "${PN}-xml", "Python basic XML support.", "${PN}-core ${PN}-elementtree ${PN}-re",
+ "lib-dynload/pyexpat.*.so xml xmllib.*" ) # package
+
+ m.addPackage( "${PN}-xmlrpc", "Python XMLRPC Support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang",
+ "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.* xmlrpc" )
+
+ m.addPackage( "${PN}-mailbox", "Python Mailbox Format Support", "${PN}-core ${PN}-mime",
+ "mailbox.*" )
+
+ m.make()
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 02/20] python-3.3-manifest: Add python3 manifest file
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
2013-08-27 17:15 ` [PATCH 01/20] generate-manifest-3.3.py: Add script to generate python 3.3 manifests Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 03/20] python3native.bbclass: Add python3 abstraction class Khem Raj
` (18 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../python/python-3.3-manifest.inc | 260 +++++++++++++++++++++
1 file changed, 260 insertions(+)
create mode 100644 meta/recipes-devtools/python/python-3.3-manifest.inc
diff --git a/meta/recipes-devtools/python/python-3.3-manifest.inc b/meta/recipes-devtools/python/python-3.3-manifest.inc
new file mode 100644
index 0000000..ad270c0
--- /dev/null
+++ b/meta/recipes-devtools/python/python-3.3-manifest.inc
@@ -0,0 +1,260 @@
+
+# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
+# Generator: '../../../scripts/contrib/python/generate-manifest-3.3.py' Version 20121010 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
+
+
+
+PROVIDES+="${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
+
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
+
+DESCRIPTION_${PN}-2to3="Python Automated Python 2 to 3 code translation"
+RDEPENDS_${PN}-2to3="${PN}-core"
+FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python3.3/lib2to3 "
+
+DESCRIPTION_${PN}-audio="Python Audio Handling"
+RDEPENDS_${PN}-audio="${PN}-core"
+FILES_${PN}-audio="${libdir}/python3.3/wave.* ${libdir}/python3.3/chunk.* ${libdir}/python3.3/sndhdr.* ${libdir}/python3.3/lib-dynload/ossaudiodev.*.so ${libdir}/python3.3/lib-dynload/audioop.*.so ${libdir}/python3.3/audiodev.* ${libdir}/python3.3/sunaudio.* ${libdir}/python3.3/sunau.* ${libdir}/python3.3/toaiff.* "
+
+DESCRIPTION_${PN}-codecs="Python Codecs, Encodings & i18n Support"
+RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
+FILES_${PN}-codecs="${libdir}/python3.3/codecs.* ${libdir}/python3.3/encodings ${libdir}/python3.3/gettext.* ${libdir}/python3.3/locale.* ${libdir}/python3.3/lib-dynload/_locale.*.so ${libdir}/python3.3/lib-dynload/_codecs* ${libdir}/python3.3/lib-dynload/_multibytecodec.*.so ${libdir}/python3.3/lib-dynload/unicodedata.*.so ${libdir}/python3.3/stringprep.* ${libdir}/python3.3/xdrlib.* "
+
+DESCRIPTION_${PN}-compile="Python Bytecode Compilation Support"
+RDEPENDS_${PN}-compile="${PN}-core"
+FILES_${PN}-compile="${libdir}/python3.3/py_compile.* ${libdir}/python3.3/compileall.* "
+
+DESCRIPTION_${PN}-compression="Python High Level Compression Support"
+RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs"
+FILES_${PN}-compression="${libdir}/python3.3/gzip.* ${libdir}/python3.3/zipfile.* ${libdir}/python3.3/tarfile.* ${libdir}/python3.3/lib-dynload/bz2.*.so "
+
+DESCRIPTION_${PN}-core="Python Interpreter and core modules (needed!)"
+RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
+FILES_${PN}-core="${libdir}/python3.3/__future__.* ${libdir}/python3.3/_abcoll.* ${libdir}/python3.3/abc.* ${libdir}/python3.3/copy.* ${libdir}/python3.3/copy_reg.* ${libdir}/python3.3/ConfigParser.* ${libdir}/python3.3/genericpath.* ${libdir}/python3.3/getopt.* ${libdir}/python3.3/linecache.* ${libdir}/python3.3/new.* ${libdir}/python3.3/os.* ${libdir}/python3.3/posixpath.* ${libdir}/python3.3/struct.* ${libdir}/python3.3/warnings.* ${libdir}/python3.3/site.* ${libdir}/python3.3/stat.* ${libdir}/python3.3/UserDict.* ${libdir}/python3.3/UserList.* ${libdir}/python3.3/UserString.* ${libdir}/python3.3/lib-dynload/binascii.*.so ${libdir}/python3.3/lib-dynload/_struct.*.so ${libdir}/python3.3/lib-dynload/time.*.so ${libdir}/python3.3/lib-dynload/xreadlines.*.so ${libdir}/python3.3/types.* ${libdir}/python3.3/platform.* ${bindir}/python* ${libdir}/python3.3/_weakrefset.* ${libdir}/python3.3/sysconfig.* ${libdir}/python3.3/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
+
+DESCRIPTION_${PN}-crypt="Python Basic Cryptographic and Hashing Support"
+RDEPENDS_${PN}-crypt="${PN}-core"
+FILES_${PN}-crypt="${libdir}/python3.3/hashlib.* ${libdir}/python3.3/md5.* ${libdir}/python3.3/sha.* ${libdir}/python3.3/lib-dynload/crypt.*.so ${libdir}/python3.3/lib-dynload/_hashlib.*.so ${libdir}/python3.3/lib-dynload/_sha256.*.so ${libdir}/python3.3/lib-dynload/_sha512.*.so "
+
+DESCRIPTION_${PN}-ctypes="Python C Types Support"
+RDEPENDS_${PN}-ctypes="${PN}-core"
+FILES_${PN}-ctypes="${libdir}/python3.3/ctypes ${libdir}/python3.3/lib-dynload/_ctypes.*.so ${libdir}/python3.3/lib-dynload/_ctypes_test.*.so "
+
+DESCRIPTION_${PN}-curses="Python Curses Support"
+RDEPENDS_${PN}-curses="${PN}-core"
+FILES_${PN}-curses="${libdir}/python3.3/curses ${libdir}/python3.3/lib-dynload/_curses.*.so ${libdir}/python3.3/lib-dynload/_curses_panel.*.so "
+
+DESCRIPTION_${PN}-datetime="Python Calendar and Time support"
+RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
+FILES_${PN}-datetime="${libdir}/python3.3/_strptime.* ${libdir}/python3.3/calendar.* ${libdir}/python3.3/lib-dynload/datetime.*.so "
+
+DESCRIPTION_${PN}-db="Python File-Based Database Support"
+RDEPENDS_${PN}-db="${PN}-core"
+FILES_${PN}-db="${libdir}/python3.3/anydbm.* ${libdir}/python3.3/dumbdbm.* ${libdir}/python3.3/whichdb.* ${libdir}/python3.3/dbm ${libdir}/python3.3/lib-dynload/_dbm.*.so "
+
+DESCRIPTION_${PN}-debugger="Python Debugger"
+RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint"
+FILES_${PN}-debugger="${libdir}/python3.3/bdb.* ${libdir}/python3.3/pdb.* "
+
+DESCRIPTION_${PN}-dev="Python Development Package"
+RDEPENDS_${PN}-dev="${PN}-core"
+FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig "
+
+DESCRIPTION_${PN}-difflib="Python helpers for computing deltas between objects."
+RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
+FILES_${PN}-difflib="${libdir}/python3.3/difflib.* "
+
+DESCRIPTION_${PN}-distutils="Python Distribution Utilities"
+RDEPENDS_${PN}-distutils="${PN}-core"
+FILES_${PN}-distutils="${libdir}/python3.3/config ${libdir}/python3.3/distutils "
+
+DESCRIPTION_${PN}-distutils-staticdev="Python Distribution Utilities (Static Libraries)"
+RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
+FILES_${PN}-distutils-staticdev="${libdir}/python3.3/config/lib*.a "
+
+DESCRIPTION_${PN}-doctest="Python framework for running examples in docstrings."
+RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
+FILES_${PN}-doctest="${libdir}/python3.3/doctest.* "
+
+DESCRIPTION_${PN}-elementtree="Python elementree"
+RDEPENDS_${PN}-elementtree="${PN}-core"
+FILES_${PN}-elementtree="${libdir}/python3.3/lib-dynload/_elementtree.*.so "
+
+DESCRIPTION_${PN}-email="Python Email Support"
+RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
+FILES_${PN}-email="${libdir}/python3.3/imaplib.* ${libdir}/python3.3/email "
+
+DESCRIPTION_${PN}-fcntl="Python's fcntl Interface"
+RDEPENDS_${PN}-fcntl="${PN}-core"
+FILES_${PN}-fcntl="${libdir}/python3.3/lib-dynload/fcntl.*.so "
+
+DESCRIPTION_${PN}-gdbm="Python GNU Database Support"
+RDEPENDS_${PN}-gdbm="${PN}-core"
+FILES_${PN}-gdbm="${libdir}/python3.3/lib-dynload/_gdbm.*.so "
+
+DESCRIPTION_${PN}-html="Python HTML Processing"
+RDEPENDS_${PN}-html="${PN}-core"
+FILES_${PN}-html="${libdir}/python3.3/formatter.* ${libdir}/python3.3/htmlentitydefs.* ${libdir}/python3.3/htmllib.* ${libdir}/python3.3/markupbase.* ${libdir}/python3.3/sgmllib.* ${libdir}/python3.3/HTMLParser.* "
+
+DESCRIPTION_${PN}-idle="Python Integrated Development Environment"
+RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
+FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.3/idlelib "
+
+DESCRIPTION_${PN}-image="Python Graphical Image Handling"
+RDEPENDS_${PN}-image="${PN}-core"
+FILES_${PN}-image="${libdir}/python3.3/colorsys.* ${libdir}/python3.3/imghdr.* ${libdir}/python3.3/lib-dynload/imageop.*.so ${libdir}/python3.3/lib-dynload/rgbimg.*.so "
+
+DESCRIPTION_${PN}-io="Python Low-Level I/O"
+RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
+FILES_${PN}-io="${libdir}/python3.3/lib-dynload/_socket.*.so ${libdir}/python3.3/lib-dynload/_io.*.so ${libdir}/python3.3/lib-dynload/_ssl.*.so ${libdir}/python3.3/lib-dynload/select.*.so ${libdir}/python3.3/lib-dynload/termios.*.so ${libdir}/python3.3/lib-dynload/cStringIO.*.so ${libdir}/python3.3/pipes.* ${libdir}/python3.3/socket.* ${libdir}/python3.3/ssl.* ${libdir}/python3.3/tempfile.* ${libdir}/python3.3/StringIO.* ${libdir}/python3.3/io.* ${libdir}/python3.3/_pyio.* "
+
+DESCRIPTION_${PN}-json="Python JSON Support"
+RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
+FILES_${PN}-json="${libdir}/python3.3/json ${libdir}/python3.3/lib-dynload/_json.*.so "
+
+DESCRIPTION_${PN}-lang="Python Low-Level Language Support"
+RDEPENDS_${PN}-lang="${PN}-core"
+FILES_${PN}-lang="${libdir}/python3.3/lib-dynload/_bisect.*.so ${libdir}/python3.3/lib-dynload/_collections.*.so ${libdir}/python3.3/lib-dynload/_heapq.*.so ${libdir}/python3.3/lib-dynload/_weakref.*.so ${libdir}/python3.3/lib-dynload/_functools.*.so ${libdir}/python3.3/lib-dynload/array.*.so ${libdir}/python3.3/lib-dynload/itertools.*.so ${libdir}/python3.3/lib-dynload/operator.*.so ${libdir}/python3.3/lib-dynload/parser.*.so ${libdir}/python3.3/atexit.* ${libdir}/python3.3/bisect.* ${libdir}/python3.3/code.* ${libdir}/python3.3/codeop.* ${libdir}/python3.3/collections.* ${libdir}/python3.3/dis.* ${libdir}/python3.3/functools.* ${libdir}/python3.3/heapq.* ${libdir}/python3.3/inspect.* ${libdir}/python3.3/keyword.* ${libdir}/python3.3/opcode.* ${libdir}/python3.3/symbol.* ${libdir}/python3.3/repr.* ${libdir}/python3.3/token.* ${libdir}/python3.3/tokenize.* ${libdir}/python3.3/traceback.* ${libdir}/python3.3/weakref.* "
+
+DESCRIPTION_${PN}-logging="Python Logging Support"
+RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
+FILES_${PN}-logging="${libdir}/python3.3/logging "
+
+DESCRIPTION_${PN}-mailbox="Python Mailbox Format Support"
+RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
+FILES_${PN}-mailbox="${libdir}/python3.3/mailbox.* "
+
+DESCRIPTION_${PN}-math="Python Math Support"
+RDEPENDS_${PN}-math="${PN}-core"
+FILES_${PN}-math="${libdir}/python3.3/lib-dynload/cmath.*.so ${libdir}/python3.3/lib-dynload/math.*.so ${libdir}/python3.3/lib-dynload/_random.*.so ${libdir}/python3.3/random.* ${libdir}/python3.3/sets.* "
+
+DESCRIPTION_${PN}-mime="Python MIME Handling APIs"
+RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
+FILES_${PN}-mime="${libdir}/python3.3/mimetools.* ${libdir}/python3.3/uu.* ${libdir}/python3.3/quopri.* ${libdir}/python3.3/rfc822.* ${libdir}/python3.3/MimeWriter.* "
+
+DESCRIPTION_${PN}-mmap="Python Memory-Mapped-File Support"
+RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
+FILES_${PN}-mmap="${libdir}/python3.3/lib-dynload/mmap.*.so "
+
+DESCRIPTION_${PN}-multiprocessing="Python Multiprocessing Support"
+RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang"
+FILES_${PN}-multiprocessing="${libdir}/python3.3/lib-dynload/_multiprocessing.*.so ${libdir}/python3.3/multiprocessing "
+
+DESCRIPTION_${PN}-netclient="Python Internet Protocol Clients"
+RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
+FILES_${PN}-netclient="${libdir}/python3.3/*Cookie*.* ${libdir}/python3.3/base64.* ${libdir}/python3.3/cookielib.* ${libdir}/python3.3/ftplib.* ${libdir}/python3.3/gopherlib.* ${libdir}/python3.3/hmac.* ${libdir}/python3.3/httplib.* ${libdir}/python3.3/mimetypes.* ${libdir}/python3.3/nntplib.* ${libdir}/python3.3/poplib.* ${libdir}/python3.3/smtplib.* ${libdir}/python3.3/telnetlib.* ${libdir}/python3.3/urllib.* ${libdir}/python3.3/urllib2.* ${libdir}/python3.3/urlparse.* ${libdir}/python3.3/uuid.* ${libdir}/python3.3/rfc822.* ${libdir}/python3.3/mimetools.* "
+
+DESCRIPTION_${PN}-netserver="Python Internet Protocol Servers"
+RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient"
+FILES_${PN}-netserver="${libdir}/python3.3/cgi.* ${libdir}/python3.3/*HTTPServer.* ${libdir}/python3.3/SocketServer.* "
+
+DESCRIPTION_${PN}-numbers="Python Number APIs"
+RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
+FILES_${PN}-numbers="${libdir}/python3.3/decimal.* ${libdir}/python3.3/numbers.* "
+
+DESCRIPTION_${PN}-pickle="Python Persistence Support"
+RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
+FILES_${PN}-pickle="${libdir}/python3.3/pickle.* ${libdir}/python3.3/shelve.* ${libdir}/python3.3/lib-dynload/cPickle.*.so ${libdir}/python3.3/pickletools.* "
+
+DESCRIPTION_${PN}-pkgutil="Python Package Extension Utility Support"
+RDEPENDS_${PN}-pkgutil="${PN}-core"
+FILES_${PN}-pkgutil="${libdir}/python3.3/pkgutil.* "
+
+DESCRIPTION_${PN}-pprint="Python Pretty-Print Support"
+RDEPENDS_${PN}-pprint="${PN}-core"
+FILES_${PN}-pprint="${libdir}/python3.3/pprint.* "
+
+DESCRIPTION_${PN}-profile="Python Basic Profiling Support"
+RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
+FILES_${PN}-profile="${libdir}/python3.3/profile.* ${libdir}/python3.3/pstats.* ${libdir}/python3.3/cProfile.* ${libdir}/python3.3/lib-dynload/_lsprof.*.so "
+
+DESCRIPTION_${PN}-pydoc="Python Interactive Help Support"
+RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
+FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.3/pydoc.* ${libdir}/python3.3/pydoc_data "
+
+DESCRIPTION_${PN}-re="Python Regular Expression APIs"
+RDEPENDS_${PN}-re="${PN}-core"
+FILES_${PN}-re="${libdir}/python3.3/re.* ${libdir}/python3.3/sre.* ${libdir}/python3.3/sre_compile.* ${libdir}/python3.3/sre_constants* ${libdir}/python3.3/sre_parse.* "
+
+DESCRIPTION_${PN}-readline="Python Readline Support"
+RDEPENDS_${PN}-readline="${PN}-core"
+FILES_${PN}-readline="${libdir}/python3.3/lib-dynload/readline.*.so ${libdir}/python3.3/rlcompleter.* "
+
+DESCRIPTION_${PN}-resource="Python Resource Control Interface"
+RDEPENDS_${PN}-resource="${PN}-core"
+FILES_${PN}-resource="${libdir}/python3.3/lib-dynload/resource.*.so "
+
+DESCRIPTION_${PN}-robotparser="Python robots.txt parser"
+RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient"
+FILES_${PN}-robotparser="${libdir}/python3.3/urllib/robotparser.* "
+
+DESCRIPTION_${PN}-shell="Python Shell-Like Functionality"
+RDEPENDS_${PN}-shell="${PN}-core ${PN}-re"
+FILES_${PN}-shell="${libdir}/python3.3/cmd.* ${libdir}/python3.3/commands.* ${libdir}/python3.3/dircache.* ${libdir}/python3.3/fnmatch.* ${libdir}/python3.3/glob.* ${libdir}/python3.3/popen2.* ${libdir}/python3.3/shlex.* ${libdir}/python3.3/shutil.* "
+
+DESCRIPTION_${PN}-smtpd="Python Simple Mail Transport Daemon"
+RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
+FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.3/smtpd.* "
+
+DESCRIPTION_${PN}-sqlite3="Python Sqlite3 Database Support"
+RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading"
+FILES_${PN}-sqlite3="${libdir}/python3.3/lib-dynload/_sqlite3.*.so ${libdir}/python3.3/sqlite3/dbapi2.* ${libdir}/python3.3/sqlite3/__init__.* ${libdir}/python3.3/sqlite3/dump.* "
+
+DESCRIPTION_${PN}-sqlite3-tests="Python Sqlite3 Database Support Tests"
+RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
+FILES_${PN}-sqlite3-tests="${libdir}/python3.3/sqlite3/test "
+
+DESCRIPTION_${PN}-stringold="Python String APIs [deprecated]"
+RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
+FILES_${PN}-stringold="${libdir}/python3.3/lib-dynload/strop.*.so ${libdir}/python3.3/string.* ${libdir}/python3.3/stringold.* "
+
+DESCRIPTION_${PN}-subprocess="Python Subprocess Support"
+RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle"
+FILES_${PN}-subprocess="${libdir}/python3.3/subprocess.* "
+
+DESCRIPTION_${PN}-syslog="Python Syslog Interface"
+RDEPENDS_${PN}-syslog="${PN}-core"
+FILES_${PN}-syslog="${libdir}/python3.3/lib-dynload/syslog.*.so "
+
+DESCRIPTION_${PN}-terminal="Python Terminal Controlling Support"
+RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
+FILES_${PN}-terminal="${libdir}/python3.3/pty.* ${libdir}/python3.3/tty.* "
+
+DESCRIPTION_${PN}-tests="Python Tests"
+RDEPENDS_${PN}-tests="${PN}-core"
+FILES_${PN}-tests="${libdir}/python3.3/test "
+
+DESCRIPTION_${PN}-textutils="Python Option Parsing, Text Wrapping and Comma-Separated-Value Support"
+RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
+FILES_${PN}-textutils="${libdir}/python3.3/lib-dynload/_csv.*.so ${libdir}/python3.3/csv.* ${libdir}/python3.3/optparse.* ${libdir}/python3.3/textwrap.* "
+
+DESCRIPTION_${PN}-threading="Python Threading & Synchronization Support"
+RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
+FILES_${PN}-threading="${libdir}/python3.3/_threading_local.* ${libdir}/python3.3/dummy_thread.* ${libdir}/python3.3/dummy_threading.* ${libdir}/python3.3/mutex.* ${libdir}/python3.3/threading.* ${libdir}/python3.3/Queue.* "
+
+DESCRIPTION_${PN}-tkinter="Python Tcl/Tk Bindings"
+RDEPENDS_${PN}-tkinter="${PN}-core"
+FILES_${PN}-tkinter="${libdir}/python3.3/lib-dynload/_tkinter.*.so ${libdir}/python3.3/lib-tk ${libdir}/python3.3/tkinter "
+
+DESCRIPTION_${PN}-unittest="Python Unit Testing Framework"
+RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang"
+FILES_${PN}-unittest="${libdir}/python3.3/unittest/ "
+
+DESCRIPTION_${PN}-unixadmin="Python Unix Administration Support"
+RDEPENDS_${PN}-unixadmin="${PN}-core"
+FILES_${PN}-unixadmin="${libdir}/python3.3/lib-dynload/nis.*.so ${libdir}/python3.3/lib-dynload/grp.*.so ${libdir}/python3.3/lib-dynload/pwd.*.so ${libdir}/python3.3/getpass.* "
+
+DESCRIPTION_${PN}-xml="Python basic XML support."
+RDEPENDS_${PN}-xml="${PN}-core ${PN}-elementtree ${PN}-re"
+FILES_${PN}-xml="${libdir}/python3.3/lib-dynload/pyexpat.*.so ${libdir}/python3.3/xml ${libdir}/python3.3/xmllib.* "
+
+DESCRIPTION_${PN}-xmlrpc="Python XMLRPC Support"
+RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
+FILES_${PN}-xmlrpc="${libdir}/python3.3/xmlrpclib.* ${libdir}/python3.3/SimpleXMLRPCServer.* ${libdir}/python3.3/DocXMLRPCServer.* ${libdir}/python3.3/xmlrpc "
+
+DESCRIPTION_${PN}-modules="All Python modules"
+RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
+ALLOW_EMPTY_${PN}-modules = "1"
+
+
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 03/20] python3native.bbclass: Add python3 abstraction class
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
2013-08-27 17:15 ` [PATCH 01/20] generate-manifest-3.3.py: Add script to generate python 3.3 manifests Khem Raj
2013-08-27 17:15 ` [PATCH 02/20] python-3.3-manifest: Add python3 manifest file Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 04/20] package_rpm.bbclass:Make the regexp less greedy Khem Raj
` (17 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/python3native.bbclass | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 meta/classes/python3native.bbclass
diff --git a/meta/classes/python3native.bbclass b/meta/classes/python3native.bbclass
new file mode 100644
index 0000000..f86374f
--- /dev/null
+++ b/meta/classes/python3native.bbclass
@@ -0,0 +1,7 @@
+PYTHON_BASEVERSION = "3.3"
+
+inherit python-dir
+
+PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
+EXTRANATIVEPATH += "${PYTHON_PN}-native"
+DEPENDS += " ${PYTHON_PN}-native "
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 04/20] package_rpm.bbclass:Make the regexp less greedy
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (2 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 03/20] python3native.bbclass: Add python3 abstraction class Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 18:47 ` Phil Blundell
2013-08-27 17:15 ` [PATCH 05/20] classes/distutils: Introduce PYTHON_PN Khem Raj
` (16 subsequent siblings)
20 siblings, 1 reply; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
This causes issues when postinstalls have ERROR keywords
its interpreted as error and image build is cancelled
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/package_rpm.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b29d3ed..a9ec9b2 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -60,7 +60,7 @@ rpm_log_check() {
lf_txt="`cat $lf_path`"
for keyword_die in "unpacking of archive failed" "Cannot find package" "exit 1" ERR Fail
do
- if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
+ if (echo "$lf_txt" | grep -v log_check | grep "\<$keyword_die\>") >/dev/null 2>&1
then
echo "log_check: There were error messages in the logfile"
printf "log_check: Matched keyword: [$keyword_die]\n\n"
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [PATCH 04/20] package_rpm.bbclass:Make the regexp less greedy
2013-08-27 17:15 ` [PATCH 04/20] package_rpm.bbclass:Make the regexp less greedy Khem Raj
@ 2013-08-27 18:47 ` Phil Blundell
2013-08-28 6:15 ` Khem Raj
0 siblings, 1 reply; 27+ messages in thread
From: Phil Blundell @ 2013-08-27 18:47 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Tue, 2013-08-27 at 10:15 -0700, Khem Raj wrote:
> This causes issues when postinstalls have ERROR keywords
> its interpreted as error and image build is cancelled
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
As I mentioned before, "the regexp" isn't a very satisfactory
description of the locus for this change, given that the file contains
many regexps. I'm also not entirely convinced that this patch really
makes the regexp "less greedy" in any meaningful way: it makes it less
prone to unintended matches, but that's a different issue to greediness.
p.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 04/20] package_rpm.bbclass:Make the regexp less greedy
2013-08-27 18:47 ` Phil Blundell
@ 2013-08-28 6:15 ` Khem Raj
0 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-28 6:15 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-core
On Aug 27, 2013, at 11:47 AM, Phil Blundell <pb@pbcl.net> wrote:
> On Tue, 2013-08-27 at 10:15 -0700, Khem Raj wrote:
>> This causes issues when postinstalls have ERROR keywords
>> its interpreted as error and image build is cancelled
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>
> As I mentioned before, "the regexp" isn't a very satisfactory
> description of the locus for this change, given that the file contains
> many regexps. I'm also not entirely convinced that this patch really
> makes the regexp "less greedy" in any meaningful way: it makes it less
> prone to unintended matches, but that's a different issue to greediness.
>
Thanks Phil, I have reworded it to make it more clearer hopefully. The commit it pushed to the pull branch here
http://git.openembedded.org/openembedded-core-contrib/commit/?h=kraj/python3&id=5ddf816178a72b685039ce5b1ab161c5c751ad5e
> p.
>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 05/20] classes/distutils: Introduce PYTHON_PN
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (3 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 04/20] package_rpm.bbclass:Make the regexp less greedy Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 06/20] classes: Add distutils for python3 Khem Raj
` (15 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
This is needed to accomodate python3 alongside
python2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/distutils-base.bbclass | 5 ++---
meta/classes/distutils-native-base.bbclass | 4 ++--
meta/classes/distutils.bbclass | 23 ++++++++++++-----------
meta/classes/python-dir.bbclass | 1 +
meta/classes/pythonnative.bbclass | 9 ++++++---
5 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/meta/classes/distutils-base.bbclass b/meta/classes/distutils-base.bbclass
index 3b43e76..aa18e8b 100644
--- a/meta/classes/distutils-base.bbclass
+++ b/meta/classes/distutils-base.bbclass
@@ -1,5 +1,4 @@
-DEPENDS += "${@["python-native python", ""][(d.getVar('PACKAGES', True) == '')]}"
-RDEPENDS_${PN} += "${@['', 'python-core']['${CLASSOVERRIDE}' == 'class-target']}"
+DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}"
+RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
inherit distutils-common-base pythonnative
-
diff --git a/meta/classes/distutils-native-base.bbclass b/meta/classes/distutils-native-base.bbclass
index ceda512..509cb95 100644
--- a/meta/classes/distutils-native-base.bbclass
+++ b/meta/classes/distutils-native-base.bbclass
@@ -1,3 +1,3 @@
-DEPENDS += "${@["python-native", ""][(d.getVar('PACKAGES', True) == '')]}"
-
inherit distutils-common-base
+
+DEPENDS += "${@["${PYTHON_PN}-native", ""][(d.getVar('PACKAGES', True) == '')]}"
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index a0e1f50..ed2b72a 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -11,15 +11,15 @@ distutils_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
- bbfatal "python setup.py build_ext execution failed."
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
}
distutils_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
- bbfatal "python setup.py install_headers execution failed."
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
}
distutils_stage_all() {
@@ -28,21 +28,22 @@ distutils_stage_all() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
- bbfatal "python setup.py install (stage) execution failed."
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
}
distutils_do_install() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
- PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
+ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
- bbfatal "python setup.py install execution failed."
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install execution failed."
- for i in `find ${D} -name "*.py"` ; do \
- sed -i -e s:${D}::g $i
+ # support filenames with *spaces*
+ find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \
+ sed -i -e s:${D}::g "$i"
done
if test -e ${D}${bindir} ; then
diff --git a/meta/classes/python-dir.bbclass b/meta/classes/python-dir.bbclass
index 0b6a33c..b4b5ab0 100644
--- a/meta/classes/python-dir.bbclass
+++ b/meta/classes/python-dir.bbclass
@@ -1,3 +1,4 @@
PYTHON_BASEVERSION ?= "2.7"
PYTHON_DIR = "python${PYTHON_BASEVERSION}"
+PYTHON_PN = "python${@'' if '${PYTHON_BASEVERSION}'.startswith('2') else '3'}"
PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"
diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass
index 7886207..fdd22bb 100644
--- a/meta/classes/pythonnative.bbclass
+++ b/meta/classes/pythonnative.bbclass
@@ -1,3 +1,6 @@
-PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
-EXTRANATIVEPATH += "python-native"
-DEPENDS += " python-native "
+
+inherit python-dir
+
+PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
+EXTRANATIVEPATH += "${PYTHON_PN}-native"
+DEPENDS += " ${PYTHON_PN}-native "
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 06/20] classes: Add distutils for python3
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (4 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 05/20] classes/distutils: Introduce PYTHON_PN Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 07/20] distutils: Introduce PYTHON_ABI variable Khem Raj
` (14 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
In line with python2 add distutils and setuptools
classes for handing python3
Use python-distribute instead of python-setuptools in setuptools bbclass
Remove --single-version-externally-managed since its setuptools
specific and we dont use it anymore
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/distutils-tools.bbclass | 77 ++++++++++++++++++++++++
meta/classes/distutils3-base.bbclass | 5 ++
meta/classes/distutils3-native-base.bbclass | 3 +
meta/classes/distutils3.bbclass | 90 +++++++++++++++++++++++++++++
meta/classes/setuptools.bbclass | 3 +-
meta/classes/setuptools3.bbclass | 8 +++
6 files changed, 184 insertions(+), 2 deletions(-)
create mode 100644 meta/classes/distutils-tools.bbclass
create mode 100644 meta/classes/distutils3-base.bbclass
create mode 100644 meta/classes/distutils3-native-base.bbclass
create mode 100644 meta/classes/distutils3.bbclass
create mode 100644 meta/classes/setuptools3.bbclass
diff --git a/meta/classes/distutils-tools.bbclass b/meta/classes/distutils-tools.bbclass
new file mode 100644
index 0000000..f43450e
--- /dev/null
+++ b/meta/classes/distutils-tools.bbclass
@@ -0,0 +1,77 @@
+DISTUTILS_BUILD_ARGS ?= ""
+DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
+DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
+ --install-data=${STAGING_DATADIR}"
+DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
+ --install-data=${D}/${datadir}"
+
+distutils_do_compile() {
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
+}
+
+distutils_stage_headers() {
+ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
+}
+
+distutils_stage_all() {
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
+ PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
+}
+
+distutils_do_install() {
+ echo "Beginning ${PN} Install ..."
+ install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+ echo "Step 2 of ${PN} Install ..."
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install execution failed."
+
+ echo "Step 3 of ${PN} Install ..."
+ # support filenames with *spaces*
+ find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \
+ sed -i -e s:${D}::g $i
+ done
+
+ echo "Step 4 of ${PN} Install ..."
+ if test -e ${D}${bindir} ; then
+ for i in ${D}${bindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+
+ echo "Step 4 of ${PN} Install ..."
+ if test -e ${D}${sbindir}; then
+ for i in ${D}${sbindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+
+ echo "Step 5 of ${PN} Install ..."
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
+
+ #
+ # FIXME: Bandaid against wrong datadir computation
+ #
+ if test -e ${D}${datadir}/share; then
+ mv -f ${D}${datadir}/share/* ${D}${datadir}/
+ fi
+}
+
+#EXPORT_FUNCTIONS do_compile do_install
+
+export LDSHARED="${CCLD} -shared"
diff --git a/meta/classes/distutils3-base.bbclass b/meta/classes/distutils3-base.bbclass
new file mode 100644
index 0000000..82ab6a3
--- /dev/null
+++ b/meta/classes/distutils3-base.bbclass
@@ -0,0 +1,5 @@
+DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}"
+RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
+
+inherit distutils-common-base python3native
+
diff --git a/meta/classes/distutils3-native-base.bbclass b/meta/classes/distutils3-native-base.bbclass
new file mode 100644
index 0000000..b4a333f
--- /dev/null
+++ b/meta/classes/distutils3-native-base.bbclass
@@ -0,0 +1,3 @@
+PYTHON_BASEVERSION = "3.3"
+
+inherit distutils-native-base
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
new file mode 100644
index 0000000..602ce48
--- /dev/null
+++ b/meta/classes/distutils3.bbclass
@@ -0,0 +1,90 @@
+
+PYTHON_BASEVERSION = "3.3"
+
+inherit distutils3-base
+#distutils-tools
+
+DISTUTILS_BUILD_ARGS ?= ""
+DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
+DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
+ --install-data=${STAGING_DATADIR}"
+DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
+ --install-data=${D}/${datadir}"
+
+distutils3_do_compile() {
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
+}
+
+distutils3_stage_headers() {
+ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
+}
+
+distutils3_stage_all() {
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
+ PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
+}
+
+distutils3_do_install() {
+ echo "Beginning ${PN} Install ..."
+ install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+
+ echo "Step 2 of ${PN} Install ..."
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install execution failed."
+
+ echo "Step 3 of ${PN} Install ..."
+ # support filenames with *spaces*
+ find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \
+ sed -i -e s:${D}::g "$i"
+ done
+
+ echo "Step 4 of ${PN} Install ..."
+ if test -e ${D}${bindir} ; then
+ for i in ${D}${bindir}/* ; do \
+ echo "Processing " $i; \
+ sed -i \
+ -e s:${STAGING_BINDIR_NATIVE}/python3-native:${bindir}:g \
+ $i
+ done
+ fi
+
+ echo "Step 4 of ${PN} Install ..."
+ if test -e ${D}${sbindir}; then
+ for i in ${D}${sbindir}/* ; do \
+ echo "Processing " $i; \
+ sed -i \
+ -e s:${STAGING_BINDIR_NATIVE}/python3-native:${bindir}:g \
+ $i
+ done
+ fi
+
+ echo "Step 5 of ${PN} Install ..."
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
+
+ #
+ # FIXME: Bandaid against wrong datadir computation
+ #
+ if test -e ${D}${datadir}/share; then
+ mv -f ${D}${datadir}/share/* ${D}${datadir}/
+ fi
+}
+
+EXPORT_FUNCTIONS do_compile do_install
+
+export LDSHARED="${CCLD} -shared"
diff --git a/meta/classes/setuptools.bbclass b/meta/classes/setuptools.bbclass
index ba9cf13..56343b1 100644
--- a/meta/classes/setuptools.bbclass
+++ b/meta/classes/setuptools.bbclass
@@ -1,9 +1,8 @@
inherit distutils
-DEPENDS += "python-setuptools-native"
+DEPENDS += "python-distribute-native"
DISTUTILS_INSTALL_ARGS = "--root=${D} \
- --single-version-externally-managed \
--prefix=${prefix} \
--install-lib=${PYTHON_SITEPACKAGES_DIR} \
--install-data=${datadir}"
diff --git a/meta/classes/setuptools3.bbclass b/meta/classes/setuptools3.bbclass
new file mode 100644
index 0000000..40c18c8
--- /dev/null
+++ b/meta/classes/setuptools3.bbclass
@@ -0,0 +1,8 @@
+inherit distutils3
+
+DEPENDS += "python3-distribute-native"
+
+DISTUTILS_INSTALL_ARGS = "--root=${D} \
+ --prefix=${prefix} \
+ --install-lib=${PYTHON_SITEPACKAGES_DIR} \
+ --install-data=${datadir}"
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 07/20] distutils: Introduce PYTHON_ABI variable
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (5 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 06/20] classes: Add distutils for python3 Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 08/20] distutils3: Do build_ext as separate step during compile Khem Raj
` (13 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
In python3 this has to be taken care of, it defines a variable to
denote ABI currently its at 'm' and it uses this to construct
the directory names for installing the python headers and library
names in sysroot. e.g. it will be something like ../python3.3m/...
We need this information when we are using distutils to cross build
python extentions and want to know the locations of python headers
and libraries install locations
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/distutils3-base.bbclass | 3 +++
meta/classes/distutils3-native-base.bbclass | 1 +
meta/classes/python-dir.bbclass | 1 +
3 files changed, 5 insertions(+)
diff --git a/meta/classes/distutils3-base.bbclass b/meta/classes/distutils3-base.bbclass
index 82ab6a3..d4d25dc 100644
--- a/meta/classes/distutils3-base.bbclass
+++ b/meta/classes/distutils3-base.bbclass
@@ -1,5 +1,8 @@
DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}"
RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
+PYTHON_BASEVERSION = "3.3"
+PYTHON_ABI = "m"
+
inherit distutils-common-base python3native
diff --git a/meta/classes/distutils3-native-base.bbclass b/meta/classes/distutils3-native-base.bbclass
index b4a333f..ed3fe54 100644
--- a/meta/classes/distutils3-native-base.bbclass
+++ b/meta/classes/distutils3-native-base.bbclass
@@ -1,3 +1,4 @@
PYTHON_BASEVERSION = "3.3"
+PYTHON_ABI = "m"
inherit distutils-native-base
diff --git a/meta/classes/python-dir.bbclass b/meta/classes/python-dir.bbclass
index b4b5ab0..ebfa4b3 100644
--- a/meta/classes/python-dir.bbclass
+++ b/meta/classes/python-dir.bbclass
@@ -1,4 +1,5 @@
PYTHON_BASEVERSION ?= "2.7"
+PYTHON_ABI ?= ""
PYTHON_DIR = "python${PYTHON_BASEVERSION}"
PYTHON_PN = "python${@'' if '${PYTHON_BASEVERSION}'.startswith('2') else '3'}"
PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 08/20] distutils3: Do build_ext as separate step during compile
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (6 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 07/20] distutils: Introduce PYTHON_ABI variable Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 09/20] python3: Add recipes Khem Raj
` (12 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Remove PYTHON_BASEVERSION its moved to distutils3-base class
Add DISTUTILS_BUILD_EXT_ARGS for modules to pass flags to build_ext step
in setup.py
Add build_ext as sepate step during compile and add
the cross sysrooted library and headers since we are cross
compiling
Use ${PYTHON_PN} in place of hardcoding python name
Remove the /etc/share if its empty
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/distutils3.bbclass | 36 ++++++++++++++----------------------
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index 602ce48..f118fa0 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -1,10 +1,7 @@
-
-PYTHON_BASEVERSION = "3.3"
-
-inherit distutils3-base
-#distutils-tools
+inherit distutils3-base
DISTUTILS_BUILD_ARGS ?= ""
+DISTUTILS_BUILD_EXT_ARGS ?= ""
DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
--install-data=${STAGING_DATADIR}"
@@ -15,7 +12,12 @@ distutils3_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
+ build_ext --include-dirs ${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \
+ --library-dirs ${STAGING_LIBCDIR}/${PYTHON_DIR} \
+ ${DISTUTILS_BUILD_EXT_ARGS} \
+ build ${DISTUTILS_BUILD_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build_ext ${DISTUTILS_BUILD_ARGS} || \
bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
}
@@ -37,44 +39,33 @@ distutils3_stage_all() {
}
distutils3_do_install() {
- echo "Beginning ${PN} Install ..."
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
-
- echo "Step 2 of ${PN} Install ..."
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install execution failed."
- echo "Step 3 of ${PN} Install ..."
# support filenames with *spaces*
find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \
sed -i -e s:${D}::g "$i"
done
- echo "Step 4 of ${PN} Install ..."
if test -e ${D}${bindir} ; then
for i in ${D}${bindir}/* ; do \
- echo "Processing " $i; \
- sed -i \
- -e s:${STAGING_BINDIR_NATIVE}/python3-native:${bindir}:g \
- $i
+ sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
fi
- echo "Step 4 of ${PN} Install ..."
if test -e ${D}${sbindir}; then
for i in ${D}${sbindir}/* ; do \
- echo "Processing " $i; \
- sed -i \
- -e s:${STAGING_BINDIR_NATIVE}/python3-native:${bindir}:g \
- $i
+ sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
fi
- echo "Step 5 of ${PN} Install ..."
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
#
@@ -82,6 +73,7 @@ distutils3_do_install() {
#
if test -e ${D}${datadir}/share; then
mv -f ${D}${datadir}/share/* ${D}${datadir}/
+ rmdir ${D}${datadir}/share
fi
}
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 09/20] python3: Add recipes
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (7 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 08/20] distutils3: Do build_ext as separate step during compile Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 10/20] python3: Add native recipe Khem Raj
` (11 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../python/python3/000-cross-compile.patch | 76 +++++
.../python3/020-dont-compile-python-files.patch | 31 ++
.../python/python3/03-fix-tkinter-detection.patch | 42 +++
.../python/python3/030-fixup-include-dirs.patch | 36 +++
.../python/python3/04-default-is-optimized.patch | 58 ++++
.../python3/06-ctypes-libffi-fix-configure.patch | 44 +++
.../python3/070-dont-clean-ipkg-install.patch | 30 ++
.../python3/080-distutils-dont_adjust_files.patch | 86 +++++
.../python/python3/110-enable-zlib.patch | 15 +
.../python/python3/130-readline-setup.patch | 49 +++
.../python/python3/140-verbose-sharedmods.patch | 10 +
.../python/python3/150-fix-setupterm.patch | 11 +
.../python3/avoid_warning_about_tkinter.patch | 25 ++
meta/recipes-devtools/python/python3/cgi_py.patch | 23 ++
.../python3/fix_for_using_different_libdir.patch | 54 ++++
.../python/python3/h2py-pr13032.patch | 185 +++++++++++
.../python3/host_include_contamination.patch | 28 ++
.../python/python3/python-3.3-multilib.patch | 348 +++++++++++++++++++++
.../python/python3/remove_sqlite_rpath.patch | 19 ++
.../python/python3/setuptweaks.patch | 57 ++++
.../python/python3/shutil-follow-symlink-fix.patch | 11 +
.../python/python3/sitecustomize.py | 37 +++
.../sys_platform_is_now_always_linux2.patch | 29 ++
meta/recipes-devtools/python/python3_3.3.0.bb | 203 ++++++++++++
24 files changed, 1507 insertions(+)
create mode 100644 meta/recipes-devtools/python/python3/000-cross-compile.patch
create mode 100644 meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
create mode 100644 meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch
create mode 100644 meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
create mode 100644 meta/recipes-devtools/python/python3/04-default-is-optimized.patch
create mode 100644 meta/recipes-devtools/python/python3/06-ctypes-libffi-fix-configure.patch
create mode 100644 meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
create mode 100644 meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch
create mode 100644 meta/recipes-devtools/python/python3/110-enable-zlib.patch
create mode 100644 meta/recipes-devtools/python/python3/130-readline-setup.patch
create mode 100644 meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch
create mode 100644 meta/recipes-devtools/python/python3/150-fix-setupterm.patch
create mode 100644 meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
create mode 100644 meta/recipes-devtools/python/python3/cgi_py.patch
create mode 100644 meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch
create mode 100644 meta/recipes-devtools/python/python3/h2py-pr13032.patch
create mode 100644 meta/recipes-devtools/python/python3/host_include_contamination.patch
create mode 100644 meta/recipes-devtools/python/python3/python-3.3-multilib.patch
create mode 100644 meta/recipes-devtools/python/python3/remove_sqlite_rpath.patch
create mode 100644 meta/recipes-devtools/python/python3/setuptweaks.patch
create mode 100644 meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch
create mode 100644 meta/recipes-devtools/python/python3/sitecustomize.py
create mode 100644 meta/recipes-devtools/python/python3/sys_platform_is_now_always_linux2.patch
create mode 100644 meta/recipes-devtools/python/python3_3.3.0.bb
diff --git a/meta/recipes-devtools/python/python3/000-cross-compile.patch b/meta/recipes-devtools/python/python3/000-cross-compile.patch
new file mode 100644
index 0000000..23c1755
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/000-cross-compile.patch
@@ -0,0 +1,76 @@
+---
+ Makefile.pre.in | 25 +++++++++++++------------
+ 1 file changed, 13 insertions(+), 12 deletions(-)
+
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -193,6 +193,7 @@ LIBOBJS= @LIBOBJS@
+
+ PYTHON= python$(EXE)
+ BUILDPYTHON= python$(BUILDEXE)
++HOSTPYTHON= $(BUILDPYTHON)
+
+ PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
+ _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
+@@ -239,6 +240,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
+ ##########################################################################
+ # Parser
+ PGEN= Parser/pgen$(EXE)
++HOSTPGEN= $(PGEN)$(EXE)
+
+ PSRCS= \
+ Parser/acceler.c \
+@@ -451,7 +453,7 @@ build_all_generate_profile:
+
+ run_profile_task:
+ : # FIXME: can't run for a cross build
+- $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK)
++ $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK)
+
+ build_all_use_profile:
+ $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use -fprofile-correction"
+@@ -640,7 +642,7 @@ $(IO_OBJS): $(IO_H)
+ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
+ @$(MKDIR_P) Include
+ $(MAKE) $(PGEN)
+- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
+ $(MAKE) $(GRAMMAR_H)
+ touch $(GRAMMAR_C)
+@@ -820,7 +822,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
+ ######################################################################
+
+ TESTOPTS= $(EXTRATESTOPTS)
+-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
++TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) $(TESTPYTHONOPTS)
+ TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
+ TESTTIMEOUT= 3600
+
+@@ -1229,7 +1231,7 @@ frameworkinstallstructure: $(LDLIBRARY)
+ fi; \
+ done
+ $(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
+- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
++ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
+ $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
+ $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
+ $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
+@@ -1288,7 +1290,7 @@ config.status: $(srcdir)/configure
+
+ # Run reindent on the library
+ reindent:
+- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
++ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
+
+ # Rerun configure with the same options as it was run last time,
+ # provided the config.status script exists
+@@ -1414,7 +1416,7 @@ funny:
+
+ # Perform some verification checks on any modified files.
+ patchcheck:
+- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
++ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
+
+ # Dependencies
+
diff --git a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
new file mode 100644
index 0000000..07a906e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
@@ -0,0 +1,31 @@
+---
+ Makefile.pre.in | 16 ----------------
+ 1 file changed, 16 deletions(-)
+
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1078,24 +1078,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+- $(DESTDIR)$(LIBDEST)
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+- $(DESTDIR)$(LIBDEST)
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST)/site-packages -f \
+- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST)/site-packages -f \
+- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
diff --git a/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch
new file mode 100644
index 0000000..fddfd2b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch
@@ -0,0 +1,42 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+# We need to supply STAGING_INCDIR here, otherwise the Tk headers
+# will not be found.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille.de>
+
+Index: Python-3.3.0rc2/setup.py
+===================================================================
+--- Python-3.3.0rc2.orig/setup.py 2012-09-20 15:24:14.009124003 -0700
++++ Python-3.3.0rc2/setup.py 2012-09-20 15:25:08.449124963 -0700
+@@ -1620,7 +1620,7 @@
+ dotversion = dotversion[:-1] + '.' + dotversion[-1]
+ tcl_include_sub = []
+ tk_include_sub = []
+- for dir in inc_dirs:
++ for dir in [os.getenv("STAGING_INCDIR")]:
+ tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
+ tk_include_sub += [dir + os.sep + "tk" + dotversion]
+ tk_include_sub += tcl_include_sub
+@@ -1639,22 +1639,6 @@
+ if dir not in include_dirs:
+ include_dirs.append(dir)
+
+- # Check for various platform-specific directories
+- if host_platform == 'sunos5':
+- include_dirs.append('/usr/openwin/include')
+- added_lib_dirs.append('/usr/openwin/lib')
+- elif os.path.exists('/usr/X11R6/include'):
+- include_dirs.append('/usr/X11R6/include')
+- added_lib_dirs.append('/usr/X11R6/lib64')
+- added_lib_dirs.append('/usr/X11R6/lib')
+- elif os.path.exists('/usr/X11R5/include'):
+- include_dirs.append('/usr/X11R5/include')
+- added_lib_dirs.append('/usr/X11R5/lib')
+- else:
+- # Assume default location for X11
+- include_dirs.append('/usr/X11/include')
+- added_lib_dirs.append('/usr/X11/lib')
+-
+ # If Cygwin, then verify that X is installed before proceeding
+ if host_platform == 'cygwin':
+ x11_inc = find_file('X11/Xlib.h', [], include_dirs)
diff --git a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
new file mode 100644
index 0000000..4882118
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
@@ -0,0 +1,36 @@
+---
+ setup.py | 15 ++-------------
+ 1 file changed, 2 insertions(+), 13 deletions(-)
+
+--- a/setup.py
++++ b/setup.py
+@@ -464,7 +464,8 @@ class PyBuildExt(build_ext):
+ # only change this for cross builds for 3.3, issues on Mageia
+ if cross_compiling:
+ self.add_gcc_paths()
+- self.add_multiarch_paths()
++ if not cross_compiling:
++ self.add_multiarch_paths()
+
+ # Add paths specified in the environment variables LDFLAGS and
+ # CPPFLAGS for header and library files.
+@@ -500,7 +501,7 @@ class PyBuildExt(build_ext):
+ for directory in reversed(options.dirs):
+ add_dir_to_list(dir_list, directory)
+
+- if os.path.normpath(sys.base_prefix) != '/usr' \
++ if not cross_compiling and os.path.normpath(sys.base_prefix) != '/usr' \
+ and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
+ # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
+ # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+@@ -520,6 +521,10 @@ class PyBuildExt(build_ext):
+ '/lib', '/usr/lib',
+ ]
+ inc_dirs = self.compiler.include_dirs + ['/usr/include']
++ if cross_compiling:
++ lib_dirs = self.compiler.library_dirs
++ inc_dirs = self.compiler.include_dirs
++
+ exts = []
+ missing = []
+
diff --git a/meta/recipes-devtools/python/python3/04-default-is-optimized.patch b/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
new file mode 100644
index 0000000..d5afd40
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
@@ -0,0 +1,58 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Updated original patch for python 2.7.3
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/05/01
+
+
+# when compiling for an embedded system, we need every bit of
+# performance we can get. default to optimized with the option
+# of opt-out.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+
+Index: Python-3.2.3/Python/compile.c
+===================================================================
+--- Python-3.2.3.orig/Python/compile.c 2012-04-10 23:54:08.000000000 -0700
++++ Python-3.2.3/Python/compile.c 2012-09-19 15:58:46.649123998 -0700
+@@ -30,7 +30,7 @@
+ #include "symtable.h"
+ #include "opcode.h"
+
+-int Py_OptimizeFlag = 0;
++int Py_OptimizeFlag = 1;
+
+ #define DEFAULT_BLOCK_SIZE 16
+ #define DEFAULT_BLOCKS 8
+Index: Python-3.2.3/Modules/main.c
+===================================================================
+--- Python-3.2.3.orig/Modules/main.c 2012-04-10 23:54:07.000000000 -0700
++++ Python-3.2.3/Modules/main.c 2012-09-19 16:00:32.153124053 -0700
+@@ -46,7 +46,7 @@
+ static int orig_argc;
+
+ /* command line options */
+-#define BASE_OPTS L"bBc:dEhiJm:OqRsStuvVW:xX:?"
++#define BASE_OPTS L"bBc:dEhiJm:NOqRsStuvVW:xX:?"
+
+ #define PROGRAM_OPTS BASE_OPTS
+
+@@ -71,6 +71,7 @@
+ -m mod : run library module as a script (terminates option list)\n\
+ -O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
+ -OO : remove doc-strings in addition to the -O optimizations\n\
++-N : do NOT optimize generated bytecode\n\
+ -q : don't print version and copyright messages on interactive startup\n\
+ -R : use a pseudo-random salt to make hash() values of various types be\n\
+ unpredictable between separate invocations of the interpreter, as\n\
+@@ -407,8 +408,8 @@
+
+ /* case 'J': reserved for Jython */
+
+- case 'O':
+- Py_OptimizeFlag++;
++ case 'N':
++ Py_OptimizeFlag=0;
+ break;
+
+ case 'B':
diff --git a/meta/recipes-devtools/python/python3/06-ctypes-libffi-fix-configure.patch b/meta/recipes-devtools/python/python3/06-ctypes-libffi-fix-configure.patch
new file mode 100644
index 0000000..abd63d2
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/06-ctypes-libffi-fix-configure.patch
@@ -0,0 +1,44 @@
+This fixes configure issues with recent autoconf, e.g:
+ autoreconf: Entering directory `Modules/_ctypes/libffi'
+ autoreconf: configure.ac: not using Gettext
+ autoreconf: running: aclocal --force
+ configure.ac:26: error: m4_copy: won't overwrite defined macro: _AC_ARG_VAR_PRECIOUS
+ configure.ac:26: the top level
+
+The problem is still present in python-2.6.5 but fixed in python-svn.
+
+Upstream-Status: Accepted [python-svn]
+
+Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
+Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+
+2011/09/29
+Rebased for python 2.7.2
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+
+
+Index: Python-2.7.2/Modules/_ctypes/libffi/Makefile.am
+===================================================================
+--- Python-2.7.2.orig/Modules/_ctypes/libffi/Makefile.am
++++ Python-2.7.2/Modules/_ctypes/libffi/Makefile.am
+@@ -2,7 +2,7 @@
+
+ AUTOMAKE_OPTIONS = foreign subdir-objects
+
+-SUBDIRS = include testsuite man
++SUBDIRS = include
+
+ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
+ src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
+@@ -34,8 +34,6 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
+ libtool-version ChangeLog.libffi m4/libtool.m4 \
+ m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
+
+-info_TEXINFOS = doc/libffi.texi
+-
+ ## ################################################################
+
+ ##
diff --git a/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
new file mode 100644
index 0000000..2ac85d9
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
@@ -0,0 +1,30 @@
+---
+ Makefile.pre.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1306,8 +1306,8 @@ touch:
+ # Sanitation targets -- clean leaves libraries, executables and tags
+ # files, which clobber removes as well
+ pycremoval:
+- -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';'
+- -find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
++ -find $(srcdir) ! -path './ipkg-install/*' -depth -name '__pycache__' -exec rm -rf {} ';'
++ -find $(srcdir) ! -path './ipkg-install/*' -name '*.py[co]' -exec rm -f {} ';'
+
+ rmtestturds:
+ -rm -f *BAD *GOOD *SKIPPED
+@@ -1321,9 +1321,9 @@ docclean:
+ -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
+
+ clean: pycremoval
+- find . -name '*.[oa]' -exec rm -f {} ';'
+- find . -name '*.s[ol]' -exec rm -f {} ';'
+- find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
++ find . ! -path './ipkg-install/*' -name '*.[oa]' -exec rm -f {} ';'
++ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';'
++ find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
+ find build -name 'fficonfig.h' -exec rm -f {} ';' || true
+ find build -name 'fficonfig.py' -exec rm -f {} ';' || true
+ -rm -f Lib/lib2to3/*Grammar*.pickle
diff --git a/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch
new file mode 100644
index 0000000..ac5450b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch
@@ -0,0 +1,86 @@
+---
+ Lib/distutils/command/build_scripts.py | 43 +++------------------------------
+ 1 file changed, 4 insertions(+), 39 deletions(-)
+
+--- a/Lib/distutils/command/build_scripts.py
++++ b/Lib/distutils/command/build_scripts.py
+@@ -51,10 +51,7 @@ class build_scripts(Command):
+
+
+ def copy_scripts(self):
+- """Copy each script listed in 'self.scripts'; if it's marked as a
+- Python script in the Unix way (first line matches 'first_line_re',
+- ie. starts with "\#!" and contains "python"), then adjust the first
+- line to refer to the current Python interpreter as we copy.
++ """Copy each script listed in 'self.scripts'
+ """
+ self.mkpath(self.build_dir)
+ outfiles = []
+@@ -78,64 +75,10 @@ class build_scripts(Command):
+ if not self.dry_run:
+ raise
+ f = None
+- else:
+- encoding, lines = tokenize.detect_encoding(f.readline)
+- f.seek(0)
+- first_line = f.readline()
+- if not first_line:
+- self.warn("%s is an empty file (skipping)" % script)
+- continue
+-
+- match = first_line_re.match(first_line)
+- if match:
+- adjust = True
+- post_interp = match.group(1) or b''
+-
+- if adjust:
+- log.info("copying and adjusting %s -> %s", script,
+- self.build_dir)
+- updated_files.append(outfile)
+- if not self.dry_run:
+- if not sysconfig.python_build:
+- executable = self.executable
+- else:
+- executable = os.path.join(
+- sysconfig.get_config_var("BINDIR"),
+- "python%s%s" % (sysconfig.get_config_var("VERSION"),
+- sysconfig.get_config_var("EXE")))
+- executable = os.fsencode(executable)
+- shebang = b"#!" + executable + post_interp + b"\n"
+- # Python parser starts to read a script using UTF-8 until
+- # it gets a #coding:xxx cookie. The shebang has to be the
+- # first line of a file, the #coding:xxx cookie cannot be
+- # written before. So the shebang has to be decodable from
+- # UTF-8.
+- try:
+- shebang.decode('utf-8')
+- except UnicodeDecodeError:
+- raise ValueError(
+- "The shebang ({!r}) is not decodable "
+- "from utf-8".format(shebang))
+- # If the script is encoded to a custom encoding (use a
+- # #coding:xxx cookie), the shebang has to be decodable from
+- # the script encoding too.
+- try:
+- shebang.decode(encoding)
+- except UnicodeDecodeError:
+- raise ValueError(
+- "The shebang ({!r}) is not decodable "
+- "from the script encoding ({})"
+- .format(shebang, encoding))
+- with open(outfile, "wb") as outf:
+- outf.write(shebang)
+- outf.writelines(f.readlines())
+- if f:
+- f.close()
+- else:
+- if f:
++ if f:
+ f.close()
+- updated_files.append(outfile)
+- self.copy_file(script, outfile)
++ updated_files.append(outfile)
++ self.copy_file(script, outfile)
+
+ if os.name == 'posix':
+ for file in outfiles:
diff --git a/meta/recipes-devtools/python/python3/110-enable-zlib.patch b/meta/recipes-devtools/python/python3/110-enable-zlib.patch
new file mode 100644
index 0000000..90c364e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/110-enable-zlib.patch
@@ -0,0 +1,15 @@
+---
+ Modules/Setup.dist | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Modules/Setup.dist
++++ b/Modules/Setup.dist
+@@ -354,7 +354,7 @@ _symtable symtablemodule.c
+ # Andrew Kuchling's zlib module.
+ # This require zlib 1.1.3 (or later).
+ # See http://www.gzip.org/zlib/
+-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
++zlib zlibmodule.c -lz
+
+ # Interface to the Expat XML parser
+ #
diff --git a/meta/recipes-devtools/python/python3/130-readline-setup.patch b/meta/recipes-devtools/python/python3/130-readline-setup.patch
new file mode 100644
index 0000000..3d28a19
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/130-readline-setup.patch
@@ -0,0 +1,49 @@
+--- a/setup.py
++++ b/setup.py
+@@ -666,45 +666,7 @@ class PyBuildExt(build_ext):
+ # readline
+ do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
+ readline_termcap_library = ""
+- curses_library = ""
+- # Cannot use os.popen here in py3k.
+- tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib')
+- if not os.path.exists(self.build_temp):
+- os.makedirs(self.build_temp)
+- # Determine if readline is already linked against curses or tinfo.
+- if do_readline:
+- if cross_compiling:
+- ret = os.system("%s -d %s | grep '(NEEDED)' > %s" \
+- % (sysconfig.get_config_var('READELF'),
+- do_readline, tmpfile))
+- elif find_executable('ldd'):
+- ret = os.system("ldd %s > %s" % (do_readline, tmpfile))
+- else:
+- ret = 256
+- if ret >> 8 == 0:
+- with open(tmpfile) as fp:
+- for ln in fp:
+- if 'curses' in ln:
+- readline_termcap_library = re.sub(
+- r'.*lib(n?cursesw?)\.so.*', r'\1', ln
+- ).rstrip()
+- break
+- # termcap interface split out from ncurses
+- if 'tinfo' in ln:
+- readline_termcap_library = 'tinfo'
+- break
+- if os.path.exists(tmpfile):
+- os.unlink(tmpfile)
+- # Issue 7384: If readline is already linked against curses,
+- # use the same library for the readline and curses modules.
+- if 'curses' in readline_termcap_library:
+- curses_library = readline_termcap_library
+- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+- curses_library = 'ncursesw'
+- elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+- curses_library = 'ncurses'
+- elif self.compiler.find_library_file(lib_dirs, 'curses'):
+- curses_library = 'curses'
++ curses_library = "ncurses"
+
+ if host_platform == 'darwin':
+ os_release = int(os.uname()[2].split('.')[0])
diff --git a/meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch b/meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch
new file mode 100644
index 0000000..db3f124
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch
@@ -0,0 +1,10 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -477,7 +477,6 @@ $(SYSCONFIGDATA): $(BUILDPYTHON)
+
+ # Build the shared modules
+ sharedmods: $(BUILDPYTHON) $(SYSCONFIGDATA)
+- case $$MAKEFLAGS in *s*) quiet=-q; esac; \
+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+
diff --git a/meta/recipes-devtools/python/python3/150-fix-setupterm.patch b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch
new file mode 100644
index 0000000..db53482
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch
@@ -0,0 +1,11 @@
+--- a/Modules/_cursesmodule.c
++++ b/Modules/_cursesmodule.c
+@@ -116,7 +116,7 @@ char *PyCursesVersion = "2.2";
+ #defines many common symbols (such as "lines") which breaks the
+ curses module in other ways. So the code will just specify
+ explicit prototypes here. */
+-extern int setupterm(char *,int,int *);
++//extern int setupterm(char *,int,int *);
+ #ifdef __sgi
+ #include <term.h>
+ #endif
diff --git a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
new file mode 100644
index 0000000..208c57c
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
@@ -0,0 +1,25 @@
+_tkinter module needs tk module along with tcl. tk is not yet integrated
+in yocto so we skip the check for this module.
+Avoid a warning by not adding this module to missing variable.
+
+Upstream-Status: Inappropriate [distribution]
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+Index: Python-2.7.2/setup.py
+===================================================================
+--- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300
++++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300
+@@ -1634,8 +1634,10 @@
+ # Call the method for detecting whether _tkinter can be compiled
+ self.detect_tkinter(inc_dirs, lib_dirs)
+
+- if '_tkinter' not in [e.name for e in self.extensions]:
+- missing.append('_tkinter')
++ # tkinter module will not be avalaible as yocto
++ # doesn't have tk integrated (yet)
++ #if '_tkinter' not in [e.name for e in self.extensions]:
++ # missing.append('_tkinter')
+
+ return missing
+
diff --git a/meta/recipes-devtools/python/python3/cgi_py.patch b/meta/recipes-devtools/python/python3/cgi_py.patch
new file mode 100644
index 0000000..de504f9
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/cgi_py.patch
@@ -0,0 +1,23 @@
+Lib/cgi.py: Update the script as mentioned in the comment
+
+Upstream-Status: Inappropriate [distribution]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+--- Python-2.6.6/Lib/cgi.py.orig 2010-08-01 22:14:27.000000000 -0500
++++ Python-2.6.6/Lib/cgi.py 2011-09-21 15:28:40.478208631 -0500
+@@ -1,13 +1,4 @@
+-#! /usr/local/bin/python
+-
+-# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
+-# intentionally NOT "/usr/bin/env python". On many systems
+-# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
+-# scripts, and /usr/local/bin is the default directory where Python is
+-# installed, so /usr/bin/env would be unable to find python. Granted,
+-# binary installations by Linux vendors often install Python in
+-# /usr/bin. So let those vendors patch cgi.py to match their choice
+-# of installation.
++#! /usr/bin/env python
+
+ """Support module for CGI (Common Gateway Interface) scripts.
+
diff --git a/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch b/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch
new file mode 100644
index 0000000..cd1a978
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch
@@ -0,0 +1,54 @@
+Upstream-Status: Inappropriate [Embedded specific]
+
+This patch fixes issuing with different libdir like lib64.
+This patch makes the native python binary modules findable
+in the install process of the host python.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Date: 2012/03/14
+
+Updated for python 2.7.3
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Date: 2012/05/01
+
+Index: Python-3.3.0rc2/Lib/sysconfig.py
+===================================================================
+--- Python-3.3.0rc2.orig/Lib/sysconfig.py 2012-09-20 22:50:11.000000000 -0700
++++ Python-3.3.0rc2/Lib/sysconfig.py 2012-09-20 22:53:01.561123396 -0700
+@@ -21,9 +21,9 @@
+
+ _INSTALL_SCHEMES = {
+ 'posix_prefix': {
+- 'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}',
++ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
+- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
++ 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'include':
+ '{installed_base}/include/python{py_version_short}{abiflags}',
+@@ -83,7 +83,7 @@
+ 'posix_user': {
+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
++ 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'include': '{userbase}/include/python{py_version_short}',
+ 'scripts': '{userbase}/bin',
+Index: Python-3.3.0rc2/Makefile.pre.in
+===================================================================
+--- Python-3.3.0rc2.orig/Makefile.pre.in 2012-09-20 22:50:11.000000000 -0700
++++ Python-3.3.0rc2/Makefile.pre.in 2012-09-20 22:50:54.245123997 -0700
+@@ -1080,9 +1080,9 @@
+ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
+
+ # Create the PLATDIR source directory, if one wasn't distributed..
diff --git a/meta/recipes-devtools/python/python3/h2py-pr13032.patch b/meta/recipes-devtools/python/python3/h2py-pr13032.patch
new file mode 100644
index 0000000..39b845b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/h2py-pr13032.patch
@@ -0,0 +1,185 @@
+This is backport of upstream bug
+
+http://bugs.python.org/issue13032
+
+Fixes issues like below
+
+| File "/work/yocto/poky/build/tmp/work/x86_64-poky-linux/python3-3.3.0-r0.0/Python-3.3.0rc2/Tools/scripts/h2py.py", line 167, in <module>
+| main()
+| File "/work/yocto/poky/build/tmp/work/x86_64-poky-linux/python3-3.3.0-r0.0/Python-3.3.0rc2/Tools/scripts/h2py.py", line 81, in main
+| process(fp, outfp)
+| File "/work/yocto/poky/build/tmp/work/x86_64-poky-linux/python3-3.3.0-r0.0/Python-3.3.0rc2/Tools/scripts/h2py.py", line 108, in process
+| line = fp.readline()
+| File "/work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/python3.3/encodings/ascii.py", line 26, in decode
+| return codecs.ascii_decode(input, self.errors)[0]
+| UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 175: ordinal not in range(128)
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/Tools/scripts/h2py.py
++++ b/Tools/scripts/h2py.py
+@@ -23,55 +23,56 @@
+
+ import sys, re, getopt, os
+
+-p_define = re.compile('^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
++p_define = re.compile(b'^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
+
+ p_macro = re.compile(
+- '^[\t ]*#[\t ]*define[\t ]+'
+- '([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
++ b'^[\t ]*#[\t ]*define[\t ]+'
++ b'([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
+
+-p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
++p_include = re.compile(b'^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
+
+-p_comment = re.compile(r'/\*([^*]+|\*+[^/])*(\*+/)?')
+-p_cpp_comment = re.compile('//.*')
++p_comment = re.compile(br'/\*([^*]+|\*+[^/])*(\*+/)?')
++p_cpp_comment = re.compile(b'//.*')
+
+ ignores = [p_comment, p_cpp_comment]
+
+-p_char = re.compile(r"'(\\.[^\\]*|[^\\])'")
++p_char = re.compile(br"'(\\.[^\\]*|[^\\])'")
+
+-p_hex = re.compile(r"0x([0-9a-fA-F]+)L?")
++p_hex = re.compile(br"0x([0-9a-fA-F]+)L?")
+
+ filedict = {}
+ importable = {}
+
+ try:
+- searchdirs=os.environ['include'].split(';')
++ searchdirs=os.environb[b'include'].split(b';')
+ except KeyError:
+ try:
+- searchdirs=os.environ['INCLUDE'].split(';')
++ searchdirs=os.environb[b'INCLUDE'].split(b';')
+ except KeyError:
+- searchdirs=['/usr/include']
++ searchdirs=[b'/usr/include']
+
+ def main():
+ global filedict
+ opts, args = getopt.getopt(sys.argv[1:], 'i:')
+ for o, a in opts:
+ if o == '-i':
+- ignores.append(re.compile(a))
++ ignores.append(re.compile(a.encode()))
+ if not args:
+ args = ['-']
+ for filename in args:
+ if filename == '-':
+ sys.stdout.write('# Generated by h2py from stdin\n')
+- process(sys.stdin, sys.stdout)
++ process(sys.stdin.buffer, sys.stdout.buffer)
+ else:
+- fp = open(filename, 'r')
++ filename = filename.encode()
++ fp = open(filename, 'rb')
+ outfile = os.path.basename(filename)
+- i = outfile.rfind('.')
++ i = outfile.rfind(b'.')
+ if i > 0: outfile = outfile[:i]
+ modname = outfile.upper()
+- outfile = modname + '.py'
+- outfp = open(outfile, 'w')
+- outfp.write('# Generated by h2py from %s\n' % filename)
++ outfile = modname + b'.py'
++ outfp = open(outfile, 'wb')
++ outfp.write(b'# Generated by h2py from ' + filename + b'\n')
+ filedict = {}
+ for dir in searchdirs:
+ if filename[:len(dir)] == dir:
+@@ -85,9 +86,9 @@
+ def pytify(body):
+ # replace ignored patterns by spaces
+ for p in ignores:
+- body = p.sub(' ', body)
++ body = p.sub(b' ', body)
+ # replace char literals by ord(...)
+- body = p_char.sub("ord('\\1')", body)
++ body = p_char.sub(b"ord('\\1')", body)
+ # Compute negative hexadecimal constants
+ start = 0
+ UMAX = 2*(sys.maxsize+1)
+@@ -98,7 +99,7 @@
+ val = int(body[slice(*m.span(1))], 16)
+ if val > sys.maxsize:
+ val -= UMAX
+- body = body[:s] + "(" + str(val) + ")" + body[e:]
++ body = body[:s] + b"(" + str(val).encode() + b")" + body[e:]
+ start = s + 1
+ return body
+
+@@ -111,7 +112,7 @@
+ match = p_define.match(line)
+ if match:
+ # gobble up continuation lines
+- while line[-2:] == '\\\n':
++ while line[-2:] == b'\\\n':
+ nextline = fp.readline()
+ if not nextline: break
+ lineno = lineno + 1
+@@ -120,11 +121,11 @@
+ body = line[match.end():]
+ body = pytify(body)
+ ok = 0
+- stmt = '%s = %s\n' % (name, body.strip())
++ stmt = name + b' = ' + body.strip() + b'\n'
+ try:
+ exec(stmt, env)
+ except:
+- sys.stderr.write('Skipping: %s' % stmt)
++ sys.stderr.buffer.write(b'Skipping: ' + stmt)
+ else:
+ outfp.write(stmt)
+ match = p_macro.match(line)
+@@ -132,11 +133,11 @@
+ macro, arg = match.group(1, 2)
+ body = line[match.end():]
+ body = pytify(body)
+- stmt = 'def %s(%s): return %s\n' % (macro, arg, body)
++ stmt = b'def ' + macro + b'(' + arg + b'): return ' + body + b'\n'
+ try:
+ exec(stmt, env)
+ except:
+- sys.stderr.write('Skipping: %s' % stmt)
++ sys.stderr.buffer.write(b'Skipping: ' + stmt)
+ else:
+ outfp.write(stmt)
+ match = p_include.match(line)
+@@ -145,23 +146,24 @@
+ a, b = regs[1]
+ filename = line[a:b]
+ if filename in importable:
+- outfp.write('from %s import *\n' % importable[filename])
++ outfp.write(b'from ' + importable[filename] + b' import *\n')
+ elif filename not in filedict:
+ filedict[filename] = None
+ inclfp = None
+ for dir in searchdirs:
+ try:
+- inclfp = open(dir + '/' + filename)
++ inclfp = open(dir + b'/' + filename, 'rb')
+ break
+ except IOError:
+ pass
+ if inclfp:
+ outfp.write(
+- '\n# Included from %s\n' % filename)
++ b'\n# Included from ' + filename + b'\n')
+ process(inclfp, outfp, env)
++ inclfp.close()
+ else:
+- sys.stderr.write('Warning - could not find file %s\n' %
+- filename)
++ sys.stderr.buffer.write(b'Warning - could not find file ' +
++ filename + b'\n')
+
+ if __name__ == '__main__':
+ main()
+
diff --git a/meta/recipes-devtools/python/python3/host_include_contamination.patch b/meta/recipes-devtools/python/python3/host_include_contamination.patch
new file mode 100644
index 0000000..ef2054d
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/host_include_contamination.patch
@@ -0,0 +1,28 @@
+when building python for qemux86-64 on ubuntu 11.10/64bit
+it gropes into host includes and then mixes them with cross
+includes and as a result some modules fail to compile and link
+one of the modules is python-elementtree which is then not
+found during image creation
+
+Proble is that setup.py tries to add native includes that newer
+ubuntu has introduced for multiarch support. But that should
+only happen for native builds and not cross building python
+so we add a check here.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: Python-3.3.0rc2/setup.py
+===================================================================
+--- Python-3.3.0rc2.orig/setup.py 2012-09-20 21:54:50.000000000 -0700
++++ Python-3.3.0rc2/setup.py 2012-09-20 21:57:35.029123858 -0700
+@@ -402,6 +402,9 @@
+
+ if not find_executable('dpkg-architecture'):
+ return
++ if cross_compiling:
++ return
++
+ opt = ''
+ if cross_compiling:
+ opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE')
diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
new file mode 100644
index 0000000..426e299
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -0,0 +1,348 @@
+Index: Python-3.3.0rc2/Include/pythonrun.h
+===================================================================
+--- Python-3.3.0rc2.orig/Include/pythonrun.h 2012-09-09 02:10:55.000000000 -0700
++++ Python-3.3.0rc2/Include/pythonrun.h 2012-09-20 22:46:53.273124016 -0700
+@@ -181,6 +181,8 @@
+ /* In their own files */
+ PyAPI_FUNC(const char *) Py_GetVersion(void);
+ PyAPI_FUNC(const char *) Py_GetPlatform(void);
++PyAPI_FUNC(const char *) Py_GetArch(void);
++PyAPI_FUNC(const char *) Py_GetLib(void);
+ PyAPI_FUNC(const char *) Py_GetCopyright(void);
+ PyAPI_FUNC(const char *) Py_GetCompiler(void);
+ PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
+Index: Python-3.3.0rc2/Lib/distutils/command/install.py
+===================================================================
+--- Python-3.3.0rc2.orig/Lib/distutils/command/install.py 2012-09-09 02:10:56.000000000 -0700
++++ Python-3.3.0rc2/Lib/distutils/command/install.py 2012-09-20 22:46:53.273124016 -0700
+@@ -25,6 +25,8 @@
+ from site import USER_SITE
+ HAS_USER_SITE = True
+
++libname = sys.lib
++
+ if sys.version < "2.2":
+ WINDOWS_SCHEME = {
+ 'purelib': '$base',
+@@ -45,7 +47,7 @@
+ INSTALL_SCHEMES = {
+ 'unix_prefix': {
+ 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
+ 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+Index: Python-3.3.0rc2/Lib/distutils/sysconfig.py
+===================================================================
+--- Python-3.3.0rc2.orig/Lib/distutils/sysconfig.py 2012-09-09 02:10:56.000000000 -0700
++++ Python-3.3.0rc2/Lib/distutils/sysconfig.py 2012-09-20 22:46:53.273124016 -0700
+@@ -139,8 +139,11 @@
+ prefix = plat_specific and EXEC_PREFIX or PREFIX
+
+ if os.name == "posix":
+- libpython = os.path.join(prefix,
+- "lib", "python" + get_python_version())
++ if plat_specific or standard_lib:
++ lib = sys.lib
++ else:
++ lib = "lib"
++ libpython = os.path.join(prefix, lib, "python" + get_python_version())
+ if standard_lib:
+ return libpython
+ else:
+Index: Python-3.3.0rc2/Lib/pydoc.py
+===================================================================
+--- Python-3.3.0rc2.orig/Lib/pydoc.py 2012-09-09 02:10:59.000000000 -0700
++++ Python-3.3.0rc2/Lib/pydoc.py 2012-09-20 22:46:53.273124016 -0700
+@@ -369,7 +369,7 @@
+
+ docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
+
+- basedir = os.path.join(sys.base_exec_prefix, "lib",
++ basedir = os.path.join(sys.base_exec_prefix, sys.lib,
+ "python%d.%d" % sys.version_info[:2])
+ if (isinstance(object, type(os)) and
+ (object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
+Index: Python-3.3.0rc2/Lib/site.py
+===================================================================
+--- Python-3.3.0rc2.orig/Lib/site.py 2012-09-09 02:10:59.000000000 -0700
++++ Python-3.3.0rc2/Lib/site.py 2012-09-20 22:46:53.273124016 -0700
+@@ -303,13 +303,19 @@
+ if sys.platform in ('os2emx', 'riscos'):
+ sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
+ elif os.sep == '/':
+- sitepackages.append(os.path.join(prefix, "lib",
++ sitepackages.append(os.path.join(prefix, sys.lib,
+ "python" + sys.version[:3],
+ "site-packages"))
+- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
++ if sys.lib != "lib":
++ sitepackages.append(os.path.join(prefix, "lib",
++ "python" + sys.version[:3],
++ "site-packages"))
++ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
++ if sys.lib != "lib":
++ sitepackages.append(os.path.join(prefix, "lib", "site-python"))
+ else:
+ sitepackages.append(prefix)
+- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
++ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
+ if sys.platform == "darwin":
+ # for framework builds *only* we add the standard Apple
+ # locations.
+Index: Python-3.3.0rc2/Lib/trace.py
+===================================================================
+--- Python-3.3.0rc2.orig/Lib/trace.py 2012-09-09 02:11:04.000000000 -0700
++++ Python-3.3.0rc2/Lib/trace.py 2012-09-20 22:46:53.273124016 -0700
+@@ -750,10 +750,10 @@
+ # should I also call expanduser? (after all, could use $HOME)
+
+ s = s.replace("$prefix",
+- os.path.join(sys.base_prefix, "lib",
++ os.path.join(sys.base_prefix, sys.lib,
+ "python" + sys.version[:3]))
+ s = s.replace("$exec_prefix",
+- os.path.join(sys.base_exec_prefix, "lib",
++ os.path.join(sys.base_exec_prefix, sys.lib,
+ "python" + sys.version[:3]))
+ s = os.path.normpath(s)
+ ignore_dirs.append(s)
+Index: Python-3.3.0rc2/Makefile.pre.in
+===================================================================
+--- Python-3.3.0rc2.orig/Makefile.pre.in 2012-09-20 22:45:52.000000000 -0700
++++ Python-3.3.0rc2/Makefile.pre.in 2012-09-20 22:46:53.277124015 -0700
+@@ -92,6 +92,8 @@
+
+ # Machine-dependent subdirectories
+ MACHDEP= @MACHDEP@
++LIB= @LIB@
++ARCH= @ARCH@
+
+ # Install prefix for architecture-independent files
+ prefix= @prefix@
+@@ -108,7 +110,7 @@
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ CONFINCLUDEDIR= $(exec_prefix)/include
+-SCRIPTDIR= $(prefix)/lib
++SCRIPTDIR= @libdir@
+ ABIFLAGS= @ABIFLAGS@
+
+ # Detailed destination directories
+@@ -618,6 +620,7 @@
+ -DEXEC_PREFIX='"$(exec_prefix)"' \
+ -DVERSION='"$(VERSION)"' \
+ -DVPATH='"$(VPATH)"' \
++ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \
+ -o $@ $(srcdir)/Modules/getpath.c
+
+ Modules/python.o: $(srcdir)/Modules/python.c
+@@ -669,7 +672,7 @@
+ Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+
+ Python/getplatform.o: $(srcdir)/Python/getplatform.c
+- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
++ $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
+
+ Python/importdl.o: $(srcdir)/Python/importdl.c
+ $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
+Index: Python-3.3.0rc2/Modules/getpath.c
+===================================================================
+--- Python-3.3.0rc2.orig/Modules/getpath.c 2012-09-09 02:11:09.000000000 -0700
++++ Python-3.3.0rc2/Modules/getpath.c 2012-09-20 22:46:53.277124015 -0700
+@@ -121,9 +121,11 @@
+ #define EXEC_PREFIX PREFIX
+ #endif
+
++#define LIB_PYTHON LIB "/python" VERSION
++
+ #ifndef PYTHONPATH
+-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
+- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
++#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
+ #endif
+
+ #ifndef LANDMARK
+@@ -135,7 +137,7 @@
+ static wchar_t progpath[MAXPATHLEN+1];
+ static wchar_t *module_search_path = NULL;
+ static int module_search_path_malloced = 0;
+-static wchar_t *lib_python = L"lib/python" VERSION;
++static wchar_t *lib_python = L"" LIB_PYTHON;
+
+ static void
+ reduce(wchar_t *dir)
+Index: Python-3.3.0rc2/Python/getplatform.c
+===================================================================
+--- Python-3.3.0rc2.orig/Python/getplatform.c 2012-09-09 02:11:12.000000000 -0700
++++ Python-3.3.0rc2/Python/getplatform.c 2012-09-20 22:46:53.277124015 -0700
+@@ -10,3 +10,23 @@
+ {
+ return PLATFORM;
+ }
++
++#ifndef ARCH
++#define ARCH "unknown"
++#endif
++
++const char *
++Py_GetArch(void)
++{
++ return ARCH;
++}
++
++#ifndef LIB
++#define LIB "lib"
++#endif
++
++const char *
++Py_GetLib(void)
++{
++ return LIB;
++}
+Index: Python-3.3.0rc2/Python/sysmodule.c
+===================================================================
+--- Python-3.3.0rc2.orig/Python/sysmodule.c 2012-09-09 02:11:12.000000000 -0700
++++ Python-3.3.0rc2/Python/sysmodule.c 2012-09-20 22:46:53.277124015 -0700
+@@ -1612,6 +1612,10 @@
+ PyUnicode_FromString(Py_GetCopyright()));
+ SET_SYS_FROM_STRING("platform",
+ PyUnicode_FromString(Py_GetPlatform()));
++ SET_SYS_FROM_STRING("arch",
++ PyUnicode_FromString(Py_GetArch()));
++ SET_SYS_FROM_STRING("lib",
++ PyUnicode_FromString(Py_GetLib()));
+ SET_SYS_FROM_STRING("executable",
+ PyUnicode_FromWideChar(
+ Py_GetProgramFullPath(), -1));
+Index: Python-3.3.0rc2/setup.py
+===================================================================
+--- Python-3.3.0rc2.orig/setup.py 2012-09-20 22:45:53.000000000 -0700
++++ Python-3.3.0rc2/setup.py 2012-09-20 22:46:53.277124015 -0700
+@@ -462,7 +462,7 @@
+ # directories (i.e. '.' and 'Include') must be first. See issue
+ # 10520.
+ if not cross_compiling:
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib))
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ # only change this for cross builds for 3.3, issues on Mageia
+ if cross_compiling:
+@@ -520,8 +520,7 @@
+ # be assumed that no additional -I,-L directives are needed.
+ if not cross_compiling:
+ lib_dirs = self.compiler.library_dirs + [
+- '/lib64', '/usr/lib64',
+- '/lib', '/usr/lib',
++ '/' + sys.lib, '/usr/' + sys.lib,
+ ]
+ inc_dirs = self.compiler.include_dirs + ['/usr/include']
+ if cross_compiling:
+@@ -699,11 +698,11 @@
+ elif curses_library:
+ readline_libs.append(curses_library)
+ elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
++ ['/usr/'+sys.lib+'/termcap'],
+ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
++ library_dirs=['/usr/'+sys.lib+'/termcap'],
+ extra_link_args=readline_extra_link_args,
+ libraries=readline_libs) )
+ else:
+Index: Python-3.3.0rc2/Lib/sysconfig.py
+===================================================================
+--- Python-3.3.0rc2.orig/Lib/sysconfig.py 2012-09-09 02:11:00.000000000 -0700
++++ Python-3.3.0rc2/Lib/sysconfig.py 2012-09-20 22:46:53.277124015 -0700
+@@ -21,10 +21,10 @@
+
+ _INSTALL_SCHEMES = {
+ 'posix_prefix': {
+- 'stdlib': '{installed_base}/lib/python{py_version_short}',
+- 'platstdlib': '{platbase}/lib/python{py_version_short}',
++ 'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}',
++ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
+ 'purelib': '{base}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
++ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'include':
+ '{installed_base}/include/python{py_version_short}{abiflags}',
+ 'platinclude':
+@@ -33,10 +33,10 @@
+ 'data': '{base}',
+ },
+ 'posix_home': {
+- 'stdlib': '{installed_base}/lib/python',
+- 'platstdlib': '{base}/lib/python',
++ 'stdlib': '{installed_base}/'+sys.lib+'/python',
++ 'platstdlib': '{base}/'+sys.lib+'/python',
+ 'purelib': '{base}/lib/python',
+- 'platlib': '{base}/lib/python',
++ 'platlib': '{base}/'+sys.lib+'/python',
+ 'include': '{installed_base}/include/python',
+ 'platinclude': '{installed_base}/include/python',
+ 'scripts': '{base}/bin',
+@@ -81,10 +81,10 @@
+ 'data': '{userbase}',
+ },
+ 'posix_user': {
+- 'stdlib': '{userbase}/lib/python{py_version_short}',
+- 'platstdlib': '{userbase}/lib/python{py_version_short}',
++ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
++ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
++ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'include': '{userbase}/include/python{py_version_short}',
+ 'scripts': '{userbase}/bin',
+ 'data': '{userbase}',
+Index: Python-3.3.0b2/configure.ac
+===================================================================
+--- Python-3.3.0b2.orig/configure.ac 2012-08-11 08:54:25.000000000 +0200
++++ Python-3.3.0b2/configure.ac 2012-08-23 14:49:29.000000000 +0200
+@@ -746,6 +746,41 @@
+ esac;;
+ esac
+
++AC_SUBST(ARCH)
++AC_MSG_CHECKING(ARCH)
++ARCH=`uname -m`
++case $ARCH in
++i?86) ARCH=i386;;
++esac
++AC_MSG_RESULT($ARCH)
++
++AC_SUBST(LIB)
++AC_MSG_CHECKING(LIB)
++case $ac_sys_system in
++Linux*)
++ # Test if the compiler is 64bit
++ echo 'int i;' > conftest.$ac_ext
++ python_cv_cc_64bit_output=no
++ if AC_TRY_EVAL(ac_compile); then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *"ELF 64"*)
++ python_cv_cc_64bit_output=yes
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++esac
++
++case $ARCH:$python_cv_cc_64bit_output in
++ppc64:yes | powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
++ LIB="lib64"
++ ;;
++*:*)
++ LIB="lib"
++ ;;
++esac
++AC_MSG_RESULT($LIB)
+
+ AC_SUBST(LIBRARY)
+ AC_MSG_CHECKING(LIBRARY)
diff --git a/meta/recipes-devtools/python/python3/remove_sqlite_rpath.patch b/meta/recipes-devtools/python/python3/remove_sqlite_rpath.patch
new file mode 100644
index 0000000..4ec627e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/remove_sqlite_rpath.patch
@@ -0,0 +1,19 @@
+This patch removes the RPATH setting which contains a pointer to
+the target relocated sysroot, which is incorrect.
+
+Upstream-Status: Inappropriate [Embedded Specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: Python-2.6.6/setup.py
+===================================================================
+--- Python-2.6.6.orig/setup.py 2011-09-28 14:22:57.000000000 -0700
++++ Python-2.6.6/setup.py 2011-09-28 16:11:25.147279633 -0700
+@@ -1079,7 +1079,6 @@
+ include_dirs=["Modules/_sqlite",
+ sqlite_incdir],
+ library_dirs=sqlite_libdir,
+- runtime_library_dirs=sqlite_libdir,
+ extra_link_args=sqlite_extra_link_args,
+ libraries=["sqlite3",]))
+ else:
diff --git a/meta/recipes-devtools/python/python3/setuptweaks.patch b/meta/recipes-devtools/python/python3/setuptweaks.patch
new file mode 100644
index 0000000..c34ef16
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/setuptweaks.patch
@@ -0,0 +1,57 @@
+This patch removes various ways native system options can pass into the python
+compilation and somehow break C modules.
+
+Upstream-Status: Configuration [OE Specific]
+
+RP 2012/04/23
+
+Index: Python-2.7.2/setup.py
+===================================================================
+--- Python-2.7.2.orig/setup.py 2012-04-23 20:03:47.295582553 +0000
++++ Python-2.7.2/setup.py 2012-04-23 20:03:15.000000000 +0000
+@@ -231,7 +231,13 @@
+ # compilers
+ if compiler is not None:
+ (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
+- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
++ # Need to filter out -isysroot from the flags. Ideally should
++ # figure out target flags here.
++ flags = []
++ for f in cflags.split():
++ if not f.startswith("-isystem"):
++ flags.append(f)
++ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + ' '.join(flags)
+ self.compiler.set_executables(**args)
+
+ build_ext.build_extensions(self)
+@@ -393,7 +399,6 @@
+ # into configure and stored in the Makefile (issue found on OS X 10.3).
+ for env_var, arg_name, dir_list in (
+ ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
+- ('LDFLAGS', '-L', self.compiler.library_dirs),
+ ('CPPFLAGS', '-I', self.compiler.include_dirs)):
+ env_val = sysconfig.get_config_var(env_var)
+ if env_val:
+@@ -419,16 +424,16 @@
+ for directory in reversed(options.dirs):
+ add_dir_to_list(dir_list, directory)
+
+- if os.path.normpath(sys.prefix) != '/usr' \
+- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
++# if os.path.normpath(sys.prefix) != '/usr' \
++# and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
+ # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
+ # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+ # building a framework with different architectures than
+ # the one that is currently installed (issue #7473)
+- add_dir_to_list(self.compiler.library_dirs,
+- sysconfig.get_config_var("LIBDIR"))
+- add_dir_to_list(self.compiler.include_dirs,
+- sysconfig.get_config_var("INCLUDEDIR"))
++# add_dir_to_list(self.compiler.library_dirs,
++# sysconfig.get_config_var("LIBDIR"))
++# add_dir_to_list(self.compiler.include_dirs,
++# sysconfig.get_config_var("INCLUDEDIR"))
+
+ try:
+ have_unicode = unicode
diff --git a/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch b/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch
new file mode 100644
index 0000000..0e4680e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch
@@ -0,0 +1,11 @@
+--- a/Lib/shutil.py 2013-01-29 12:31:06.926555779 -0800
++++ b/Lib/shutil.py 2013-01-29 16:31:39.097554182 -0800
+@@ -132,7 +132,7 @@ def copymode(src, dst, *, follow_symlink
+ st = stat_func(src)
+ chmod_func(dst, stat.S_IMODE(st.st_mode))
+
+-if hasattr(os, 'listxattr'):
++if hasattr(os, 'listxattr') and os.listxattr in os.supports_follow_symlinks:
+ def _copyxattr(src, dst, *, follow_symlinks=True):
+ """Copy extended filesystem attributes from `src` to `dst`.
+
diff --git a/meta/recipes-devtools/python/python3/sitecustomize.py b/meta/recipes-devtools/python/python3/sitecustomize.py
new file mode 100644
index 0000000..4c8b5e2
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/sitecustomize.py
@@ -0,0 +1,37 @@
+# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# GPLv2 or later
+# Version: 20081123
+# Features:
+# * set proper default encoding
+# * enable readline completion in the interactive interpreter
+# * load command line history on startup
+# * save command line history on exit
+
+import os
+
+def __exithandler():
+ try:
+ readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
+ except IOError:
+ pass
+
+def __registerExitHandler():
+ import atexit
+ atexit.register( __exithandler )
+
+def __enableReadlineSupport():
+ readline.set_history_length( 1000 )
+ readline.parse_and_bind( "tab: complete" )
+ try:
+ readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
+ except IOError:
+ pass
+
+import sys
+try:
+ import rlcompleter, readline
+except ImportError:
+ pass
+else:
+ __registerExitHandler()
+ __enableReadlineSupport()
diff --git a/meta/recipes-devtools/python/python3/sys_platform_is_now_always_linux2.patch b/meta/recipes-devtools/python/python3/sys_platform_is_now_always_linux2.patch
new file mode 100644
index 0000000..506210f
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/sys_platform_is_now_always_linux2.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Accepted [http://hg.python.org/cpython/rev/c816479f6aaf/]
+Bugtracker: http://bugs.python.org/issue12326
+
+[Removed "Misc/NEWS" hunk]
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+
+# HG changeset patch
+# User Victor Stinner <victor.stinner@haypocalc.com>
+# Date 1313841758 -7200
+# Node ID c816479f6aaf71dbd3f3fe4b239186d60c55ce48
+# Parent 3e093590ac57fdda428c7da3f72ddf0c475ecf2b
+Issue #12326: sys.platform is now always 'linux2' on Linux
+
+Even if Python is compiled on Linux 3.
+
+Index: Python-3.3.0rc2/configure.ac
+===================================================================
+--- Python-3.3.0rc2.orig/configure.ac 2012-09-09 02:11:14.000000000 -0700
++++ Python-3.3.0rc2/configure.ac 2012-09-20 00:44:03.317124001 -0700
+@@ -366,7 +366,7 @@
+ MACHDEP="$ac_md_system$ac_md_release"
+
+ case $MACHDEP in
+- linux*) MACHDEP="linux";;
++ linux*) MACHDEP="linux2";;
+ cygwin*) MACHDEP="cygwin";;
+ darwin*) MACHDEP="darwin";;
+ irix646) MACHDEP="irix6";;
diff --git a/meta/recipes-devtools/python/python3_3.3.0.bb b/meta/recipes-devtools/python/python3_3.3.0.bb
new file mode 100644
index 0000000..081586d
--- /dev/null
+++ b/meta/recipes-devtools/python/python3_3.3.0.bb
@@ -0,0 +1,203 @@
+require recipes-devtools/python/python.inc
+
+DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.3"
+PYTHON_BINABI= "${PYTHON_MAJMIN}m"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+file://000-cross-compile.patch \
+file://020-dont-compile-python-files.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://110-enable-zlib.patch \
+file://130-readline-setup.patch \
+file://140-verbose-sharedmods.patch \
+file://150-fix-setupterm.patch \
+file://h2py-pr13032.patch \
+${DISTRO_SRC_URI} \
+"
+
+SRC_URI += "\
+ file://03-fix-tkinter-detection.patch \
+ file://04-default-is-optimized.patch \
+ file://avoid_warning_about_tkinter.patch \
+ file://06-ctypes-libffi-fix-configure.patch \
+ file://remove_sqlite_rpath.patch \
+ file://cgi_py.patch \
+ file://host_include_contamination.patch \
+ file://python-3.3-multilib.patch \
+ file://shutil-follow-symlink-fix.patch \
+ "
+SRC_URI[md5sum] = "b3b2524f72409d919a4137826a870a8f"
+SRC_URI[sha256sum] = "15c113fd6c058712f05d31b4eff149d4d823b8e39ef5e37228dc5dc4f8716df9"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d214581529e343354f8e23025bdf582d"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python3native pkgconfig
+
+CONFIGUREOPTS += " --with-system-ffi "
+
+CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
+ ac_cv_have_lchflags=no \
+ ac_cv_have_long_long_format=yes \
+ ac_cv_buggy_getaddrinfo=no \
+ ac_cv_file__dev_ptmx=yes \
+ ac_cv_file__dev_ptc=no \
+"
+# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
+#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
+TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
+TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
+TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
+EXTRA_OEMAKE += "CROSS_COMPILE=yes"
+
+do_configure_prepend() {
+ rm -f ${S}/Makefile.orig
+ autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
+}
+
+do_compile() {
+ # regenerate platform specific files, because they depend on system headers
+ cd Lib/plat-linux*
+ include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ ${S}/Tools/scripts/h2py.py -i '(u_long)' \
+ ${STAGING_INCDIR}/dlfcn.h \
+ ${STAGING_INCDIR}/linux/cdrom.h \
+ ${STAGING_INCDIR}/netinet/in.h \
+ ${STAGING_INCDIR}/sys/types.h
+ sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+ cd -
+
+ #
+ # Copy config.h and an appropriate Makefile for distutils.sysconfig,
+ # which laters uses the information out of these to compile extensions
+ #
+ # The following part (until python compilation) should probably moved to an
+ # -initial recipe to handle staging better
+ #
+ install -d ${STAGING_INCDIR}/python${PYTHON_BINABI}/
+ install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
+ install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_BINABI}/
+
+ # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
+ sed -i -e s,ccache,'$(CCACHE)', Makefile
+
+ # remove any bogus LD_LIBRARY_PATH
+ sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+ if [ ! -f Makefile.orig ]; then
+ install -m 0644 Makefile Makefile.orig
+ fi
+ sed -i -e 's,^LDFLAGS=.*,LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
+ -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+ -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+ -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+ -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+ -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+ -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+ Makefile
+ install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
+ # save copy of it now, because if we do it in do_install and
+ # then call do_install twice we get Makefile.orig == Makefile.sysroot
+ install -m 0644 Makefile Makefile.sysroot
+
+ export CROSS_COMPILE="${TARGET_PREFIX}"
+ export PYTHONBUILDDIR="${S}"
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ OPT="${CFLAGS}" libpython3.so
+
+ oe_libinstall -so libpython${PYTHON_BINABI} ${STAGING_LIBDIR}
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native3/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native3/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ OPT="${CFLAGS}"
+}
+
+do_install() {
+ # make install needs the original Makefile, or otherwise the inclues would
+ # go to ${D}${STAGING...}/...
+ install -m 0644 Makefile.orig Makefile
+
+ export CROSS_COMPILE="${TARGET_PREFIX}"
+ export PYTHONBUILDDIR="${S}"
+ install -d ${D}${libdir}/pkgconfig
+ install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native3/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native3/python3 \
+ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ DESTDIR=${D} LIBDIR=${libdir} install
+
+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+ if [ -e ${WORKDIR}/sitecustomize.py ]; then
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+ fi
+
+ oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+ # copy back the old Makefile to fix target package
+ install -m 0644 Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+}
+
+require python-${PYTHON_MAJMIN}-manifest.inc
+
+# manual dependency additions
+RPROVIDES_${PN}-core = "${PN}"
+RRECOMMENDS_${PN}-core = "${PN}-readline"
+RRECOMMENDS_${PN}-crypt = "openssl"
+RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
+
+FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
+FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
+FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
+
+PACKAGES =+ "${PN}-pyvenv"
+FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
+
+# package libpython3
+PACKAGES =+ "libpython3 libpython3-staticdev"
+FILES_libpython3 = "${libdir}/libpython*.so.*"
+FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
+
+# catch debug extensions (isn't that already in python-core-dbg?)
+FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+BBCLASSEXTEND = "nativesdk"
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 10/20] python3: Add native recipe
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (8 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 09/20] python3: Add recipes Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 11/20] python_2.7.3.bb: Inherit python-dir Khem Raj
` (10 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../python/python3-native_3.3.0.bb | 68 ++++++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 meta/recipes-devtools/python/python3-native_3.3.0.bb
diff --git a/meta/recipes-devtools/python/python3-native_3.3.0.bb b/meta/recipes-devtools/python/python3-native_3.3.0.bb
new file mode 100644
index 0000000..3486ca0
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-native_3.3.0.bb
@@ -0,0 +1,68 @@
+require recipes-devtools/python/python.inc
+
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.3"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+file://000-cross-compile.patch \
+file://020-dont-compile-python-files.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://110-enable-zlib.patch \
+file://130-readline-setup.patch \
+file://140-verbose-sharedmods.patch \
+file://150-fix-setupterm.patch \
+file://h2py-pr13032.patch \
+file://python-3.3-multilib.patch \
+file://03-fix-tkinter-detection.patch \
+file://avoid_warning_about_tkinter.patch \
+file://06-ctypes-libffi-fix-configure.patch \
+file://shutil-follow-symlink-fix.patch \
+${DISTRO_SRC_URI} \
+"
+SRC_URI[md5sum] = "b3b2524f72409d919a4137826a870a8f"
+SRC_URI[sha256sum] = "15c113fd6c058712f05d31b4eff149d4d823b8e39ef5e37228dc5dc4f8716df9"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d214581529e343354f8e23025bdf582d"
+
+S = "${WORKDIR}/Python-${PV}"
+
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
+
+inherit native
+
+RPROVIDES += "python3-distutils-native python3-compression-native python3-textutils-native python3-core-native"
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN}"
+
+EXTRA_OEMAKE = '\
+ BUILD_SYS="" \
+ HOST_SYS="" \
+ LIBC="" \
+ STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+ STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+'
+
+do_configure_prepend() {
+ autoreconf --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
+}
+
+do_install() {
+ install -d ${D}${libdir}/pkgconfig
+ oe_runmake 'DESTDIR=${D}' install
+ if [ -e ${WORKDIR}/sitecustomize.py ]; then
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+ fi
+ install -d ${D}${bindir}/${PN}
+ install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+ # Make sure we use /usr/bin/env python
+ for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
+ done
+}
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 11/20] python_2.7.3.bb: Inherit python-dir
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (9 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 10/20] python3: Add native recipe Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 12/20] python-distribute: Add recipes for python2 and python3 Khem Raj
` (9 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
So it can get the correct python direcotries for python2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/python/python_2.7.3.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index 2e35da6..62f78dc 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -34,7 +34,7 @@ SRC_URI += "\
S = "${WORKDIR}/Python-${PV}"
-inherit autotools multilib_header pythonnative
+inherit autotools multilib_header python-dir pythonnative
# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 12/20] python-distribute: Add recipes for python2 and python3
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (10 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 11/20] python_2.7.3.bb: Inherit python-dir Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 13/20] python3: Upgrade to 3.3.2 Khem Raj
` (8 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
in python3-distribute rename easy_install to easy3_install
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../python/python-distribute_0.6.32.bb | 47 ++++++++++++++++++++++
.../python/python3-distribute_0.6.32.bb | 47 ++++++++++++++++++++++
2 files changed, 94 insertions(+)
create mode 100644 meta/recipes-devtools/python/python-distribute_0.6.32.bb
create mode 100644 meta/recipes-devtools/python/python3-distribute_0.6.32.bb
diff --git a/meta/recipes-devtools/python/python-distribute_0.6.32.bb b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
new file mode 100644
index 0000000..86ac871
--- /dev/null
+++ b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
@@ -0,0 +1,47 @@
+DESCRIPTION = "Download, build, install, upgrade, and uninstall Python packages"
+HOMEPAGE = "http://packages.python.org/distribute"
+SECTION = "devel/python"
+LICENSE = "PSF"
+LIC_FILES_CHKSUM = "file://setup.py;beginline=234;endline=234;md5=26f6b02022b737126d3c88838782dddb"
+
+SRCNAME = "distribute"
+PR = "ml5"
+DEPENDS += "python"
+DEPENDS_virtclass-native += "python-native"
+
+SRC_URI = " \
+ http://pypi.python.org/packages/source/d/distribute/${SRCNAME}-${PV}.tar.gz \
+"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+# http://python-distribute.org/distribute_setup.py
+
+# force the selection of python3
+#PYTHON_BASEVERSION = "3.3"
+#PYTHON_MAJMIN = "3.3"
+
+inherit distutils
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
+
+do_install_prepend() {
+ install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
+}
+
+#
+# The installer puts the wrong path in the setuptools.pth file. Correct it.
+#
+do_install_append() {
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+ echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+}
+
+RDEPENDS_${PN} = "\
+ python-distutils \
+ python-compression \
+"
+
+SRC_URI[md5sum] = "acb7a2da81e3612bfb1608abe4f0e568"
+SRC_URI[sha256sum] = "8970cd1e148b5d1fea9430584aea66c45ea22d80e0933393ec49ebc388f718df"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/python/python3-distribute_0.6.32.bb b/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
new file mode 100644
index 0000000..31fc56d
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
@@ -0,0 +1,47 @@
+DESCRIPTION = "Download, build, install, upgrade, and uninstall Python packages"
+HOMEPAGE = "http://packages.python.org/distribute"
+SECTION = "devel/python"
+LICENSE = "PSF"
+LIC_FILES_CHKSUM = "file://setup.py;beginline=234;endline=234;md5=26f6b02022b737126d3c88838782dddb"
+
+SRCNAME = "distribute"
+PR = "ml5"
+DEPENDS += "python3"
+DEPENDS_virtclass-native += "python3-native"
+
+SRC_URI = " \
+ http://pypi.python.org/packages/source/d/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
+"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+# http://python-distribute.org/distribute_setup.py
+
+# force the selection of python3
+#PYTHON_BASEVERSION = "3.3"
+#PYTHON_MAJMIN = "3.3"
+
+inherit distutils3
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
+
+do_install_prepend() {
+ install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
+}
+#
+# The installer puts the wrong path in the setuptools.pth file. Correct it.
+#
+do_install_append() {
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+ mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
+ echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+}
+
+RDEPENDS_${PN} = "\
+ python3-distutils \
+ python3-compression \
+"
+
+SRC_URI[md5sum] = "acb7a2da81e3612bfb1608abe4f0e568"
+SRC_URI[sha256sum] = "8970cd1e148b5d1fea9430584aea66c45ea22d80e0933393ec49ebc388f718df"
+
+BBCLASSEXTEND = "native"
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 13/20] python3: Upgrade to 3.3.2
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (11 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 12/20] python-distribute: Add recipes for python2 and python3 Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 14/20] distutils3.bbclass: Fix typo and use proper values for target sysroot Khem Raj
` (7 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
3.3.2 is latest bugfix release in 3.3 series
License text is changed to reflect year and prev releases
+++ ../Python-3.3.2/LICENSE 2013-05-15 09:32:54.000000000 -0700
@@ -74,7 +74,9 @@
3.2.1 3.2 2011 PSF yes
3.2.2 3.2.1 2011 PSF yes
3.2.3 3.2.2 2012 PSF yes
+ 3.2.4 3.2.3 2013 PSF yes
3.3.0 3.2 2012 PSF yes
+ 3.3.1 3.3.0 2013 PSF yes
Footnotes:
@@ -110,8 +112,8 @@
distribute, and otherwise use Python alone or in any derivative
version,
provided, however, that PSF's License Agreement and PSF's notice of
copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010,
-2011, 2012 Python Software Foundation; All Rights Reserved" are
retained in Python
-alone or in any derivative version prepared by Licensee.
+2011, 2012, 2013 Python Software Foundation; All Rights Reserved" are
retained
+in Python alone or in any derivative version prepared by Licensee.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...on3-native_3.3.0.bb => python3-native_3.3.2.bb} | 9 +-
...sue-13032-where-it-fails-with-UnicodeDeco.patch | 37 +++++
.../python/python3/030-fixup-include-dirs.patch | 21 +--
.../python/python3/140-verbose-sharedmods.patch | 10 --
.../python/python3/h2py-pr13032.patch | 185 ---------------------
.../python/{python3_3.3.0.bb => python3_3.3.2.bb} | 9 +-
6 files changed, 51 insertions(+), 220 deletions(-)
rename meta/recipes-devtools/python/{python3-native_3.3.0.bb => python3-native_3.3.2.bb} (87%)
create mode 100644 meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch
delete mode 100644 meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch
delete mode 100644 meta/recipes-devtools/python/python3/h2py-pr13032.patch
rename meta/recipes-devtools/python/{python3_3.3.0.bb => python3_3.3.2.bb} (96%)
diff --git a/meta/recipes-devtools/python/python3-native_3.3.0.bb b/meta/recipes-devtools/python/python3-native_3.3.2.bb
similarity index 87%
rename from meta/recipes-devtools/python/python3-native_3.3.0.bb
rename to meta/recipes-devtools/python/python3-native_3.3.2.bb
index 3486ca0..f7221ed 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.0.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.2.bb
@@ -12,20 +12,19 @@ file://070-dont-clean-ipkg-install.patch \
file://080-distutils-dont_adjust_files.patch \
file://110-enable-zlib.patch \
file://130-readline-setup.patch \
-file://140-verbose-sharedmods.patch \
file://150-fix-setupterm.patch \
-file://h2py-pr13032.patch \
file://python-3.3-multilib.patch \
file://03-fix-tkinter-detection.patch \
file://avoid_warning_about_tkinter.patch \
file://06-ctypes-libffi-fix-configure.patch \
file://shutil-follow-symlink-fix.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
${DISTRO_SRC_URI} \
"
-SRC_URI[md5sum] = "b3b2524f72409d919a4137826a870a8f"
-SRC_URI[sha256sum] = "15c113fd6c058712f05d31b4eff149d4d823b8e39ef5e37228dc5dc4f8716df9"
+SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
+SRC_URI[sha256sum] = "f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=d214581529e343354f8e23025bdf582d"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a7e738bb078a33a825ce4a0282f8cb31"
S = "${WORKDIR}/Python-${PV}"
diff --git a/meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch b/meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch
new file mode 100644
index 0000000..dd6b24f
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch
@@ -0,0 +1,37 @@
+From 2f5a4c708d90fa8db21f446ae879cff79387448d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 20 May 2013 21:03:16 -0700
+Subject: [PATCH] h2py: Fix issue 13032 where it fails with UnicodeDecodeError
+
+use utf-8 to open the files
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ Tools/scripts/h2py.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
+index 4f871d9..a53fbe0 100755
+--- a/Tools/scripts/h2py.py
++++ b/Tools/scripts/h2py.py
+@@ -69,13 +69,13 @@ def main():
+ sys.stdout.write('# Generated by h2py from stdin\n')
+ process(sys.stdin, sys.stdout)
+ else:
+- fp = open(filename, 'r')
++ fp = open(filename, 'r', encoding='utf-8')
+ outfile = os.path.basename(filename)
+ i = outfile.rfind('.')
+ if i > 0: outfile = outfile[:i]
+ modname = outfile.upper()
+ outfile = modname + '.py'
+- outfp = open(outfile, 'w')
++ outfp = open(outfile, 'w', encoding='utf-8')
+ outfp.write('# Generated by h2py from %s\n' % filename)
+ filedict = {}
+ for dir in searchdirs:
+--
+1.8.1.2
+
diff --git a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
index 4882118..3e009c1 100644
--- a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
+++ b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
@@ -2,9 +2,11 @@
setup.py | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
---- a/setup.py
-+++ b/setup.py
-@@ -464,7 +464,8 @@ class PyBuildExt(build_ext):
+Index: Python-3.3.2/setup.py
+===================================================================
+--- Python-3.3.2.orig/setup.py
++++ Python-3.3.2/setup.py
+@@ -444,7 +444,8 @@ class PyBuildExt(build_ext):
# only change this for cross builds for 3.3, issues on Mageia
if cross_compiling:
self.add_gcc_paths()
@@ -14,7 +16,7 @@
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
-@@ -500,7 +501,7 @@ class PyBuildExt(build_ext):
+@@ -480,7 +481,7 @@ class PyBuildExt(build_ext):
for directory in reversed(options.dirs):
add_dir_to_list(dir_list, directory)
@@ -23,14 +25,3 @@
and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
# OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
# (PYTHONFRAMEWORK is set) to avoid # linking problems when
-@@ -520,6 +521,10 @@ class PyBuildExt(build_ext):
- '/lib', '/usr/lib',
- ]
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
-+ if cross_compiling:
-+ lib_dirs = self.compiler.library_dirs
-+ inc_dirs = self.compiler.include_dirs
-+
- exts = []
- missing = []
-
diff --git a/meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch b/meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch
deleted file mode 100644
index db3f124..0000000
--- a/meta/recipes-devtools/python/python3/140-verbose-sharedmods.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -477,7 +477,6 @@ $(SYSCONFIGDATA): $(BUILDPYTHON)
-
- # Build the shared modules
- sharedmods: $(BUILDPYTHON) $(SYSCONFIGDATA)
-- case $$MAKEFLAGS in *s*) quiet=-q; esac; \
- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-
diff --git a/meta/recipes-devtools/python/python3/h2py-pr13032.patch b/meta/recipes-devtools/python/python3/h2py-pr13032.patch
deleted file mode 100644
index 39b845b..0000000
--- a/meta/recipes-devtools/python/python3/h2py-pr13032.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-This is backport of upstream bug
-
-http://bugs.python.org/issue13032
-
-Fixes issues like below
-
-| File "/work/yocto/poky/build/tmp/work/x86_64-poky-linux/python3-3.3.0-r0.0/Python-3.3.0rc2/Tools/scripts/h2py.py", line 167, in <module>
-| main()
-| File "/work/yocto/poky/build/tmp/work/x86_64-poky-linux/python3-3.3.0-r0.0/Python-3.3.0rc2/Tools/scripts/h2py.py", line 81, in main
-| process(fp, outfp)
-| File "/work/yocto/poky/build/tmp/work/x86_64-poky-linux/python3-3.3.0-r0.0/Python-3.3.0rc2/Tools/scripts/h2py.py", line 108, in process
-| line = fp.readline()
-| File "/work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/python3.3/encodings/ascii.py", line 26, in decode
-| return codecs.ascii_decode(input, self.errors)[0]
-| UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 175: ordinal not in range(128)
-
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---- a/Tools/scripts/h2py.py
-+++ b/Tools/scripts/h2py.py
-@@ -23,55 +23,56 @@
-
- import sys, re, getopt, os
-
--p_define = re.compile('^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
-+p_define = re.compile(b'^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
-
- p_macro = re.compile(
-- '^[\t ]*#[\t ]*define[\t ]+'
-- '([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
-+ b'^[\t ]*#[\t ]*define[\t ]+'
-+ b'([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
-
--p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
-+p_include = re.compile(b'^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
-
--p_comment = re.compile(r'/\*([^*]+|\*+[^/])*(\*+/)?')
--p_cpp_comment = re.compile('//.*')
-+p_comment = re.compile(br'/\*([^*]+|\*+[^/])*(\*+/)?')
-+p_cpp_comment = re.compile(b'//.*')
-
- ignores = [p_comment, p_cpp_comment]
-
--p_char = re.compile(r"'(\\.[^\\]*|[^\\])'")
-+p_char = re.compile(br"'(\\.[^\\]*|[^\\])'")
-
--p_hex = re.compile(r"0x([0-9a-fA-F]+)L?")
-+p_hex = re.compile(br"0x([0-9a-fA-F]+)L?")
-
- filedict = {}
- importable = {}
-
- try:
-- searchdirs=os.environ['include'].split(';')
-+ searchdirs=os.environb[b'include'].split(b';')
- except KeyError:
- try:
-- searchdirs=os.environ['INCLUDE'].split(';')
-+ searchdirs=os.environb[b'INCLUDE'].split(b';')
- except KeyError:
-- searchdirs=['/usr/include']
-+ searchdirs=[b'/usr/include']
-
- def main():
- global filedict
- opts, args = getopt.getopt(sys.argv[1:], 'i:')
- for o, a in opts:
- if o == '-i':
-- ignores.append(re.compile(a))
-+ ignores.append(re.compile(a.encode()))
- if not args:
- args = ['-']
- for filename in args:
- if filename == '-':
- sys.stdout.write('# Generated by h2py from stdin\n')
-- process(sys.stdin, sys.stdout)
-+ process(sys.stdin.buffer, sys.stdout.buffer)
- else:
-- fp = open(filename, 'r')
-+ filename = filename.encode()
-+ fp = open(filename, 'rb')
- outfile = os.path.basename(filename)
-- i = outfile.rfind('.')
-+ i = outfile.rfind(b'.')
- if i > 0: outfile = outfile[:i]
- modname = outfile.upper()
-- outfile = modname + '.py'
-- outfp = open(outfile, 'w')
-- outfp.write('# Generated by h2py from %s\n' % filename)
-+ outfile = modname + b'.py'
-+ outfp = open(outfile, 'wb')
-+ outfp.write(b'# Generated by h2py from ' + filename + b'\n')
- filedict = {}
- for dir in searchdirs:
- if filename[:len(dir)] == dir:
-@@ -85,9 +86,9 @@
- def pytify(body):
- # replace ignored patterns by spaces
- for p in ignores:
-- body = p.sub(' ', body)
-+ body = p.sub(b' ', body)
- # replace char literals by ord(...)
-- body = p_char.sub("ord('\\1')", body)
-+ body = p_char.sub(b"ord('\\1')", body)
- # Compute negative hexadecimal constants
- start = 0
- UMAX = 2*(sys.maxsize+1)
-@@ -98,7 +99,7 @@
- val = int(body[slice(*m.span(1))], 16)
- if val > sys.maxsize:
- val -= UMAX
-- body = body[:s] + "(" + str(val) + ")" + body[e:]
-+ body = body[:s] + b"(" + str(val).encode() + b")" + body[e:]
- start = s + 1
- return body
-
-@@ -111,7 +112,7 @@
- match = p_define.match(line)
- if match:
- # gobble up continuation lines
-- while line[-2:] == '\\\n':
-+ while line[-2:] == b'\\\n':
- nextline = fp.readline()
- if not nextline: break
- lineno = lineno + 1
-@@ -120,11 +121,11 @@
- body = line[match.end():]
- body = pytify(body)
- ok = 0
-- stmt = '%s = %s\n' % (name, body.strip())
-+ stmt = name + b' = ' + body.strip() + b'\n'
- try:
- exec(stmt, env)
- except:
-- sys.stderr.write('Skipping: %s' % stmt)
-+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
- else:
- outfp.write(stmt)
- match = p_macro.match(line)
-@@ -132,11 +133,11 @@
- macro, arg = match.group(1, 2)
- body = line[match.end():]
- body = pytify(body)
-- stmt = 'def %s(%s): return %s\n' % (macro, arg, body)
-+ stmt = b'def ' + macro + b'(' + arg + b'): return ' + body + b'\n'
- try:
- exec(stmt, env)
- except:
-- sys.stderr.write('Skipping: %s' % stmt)
-+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
- else:
- outfp.write(stmt)
- match = p_include.match(line)
-@@ -145,23 +146,24 @@
- a, b = regs[1]
- filename = line[a:b]
- if filename in importable:
-- outfp.write('from %s import *\n' % importable[filename])
-+ outfp.write(b'from ' + importable[filename] + b' import *\n')
- elif filename not in filedict:
- filedict[filename] = None
- inclfp = None
- for dir in searchdirs:
- try:
-- inclfp = open(dir + '/' + filename)
-+ inclfp = open(dir + b'/' + filename, 'rb')
- break
- except IOError:
- pass
- if inclfp:
- outfp.write(
-- '\n# Included from %s\n' % filename)
-+ b'\n# Included from ' + filename + b'\n')
- process(inclfp, outfp, env)
-+ inclfp.close()
- else:
-- sys.stderr.write('Warning - could not find file %s\n' %
-- filename)
-+ sys.stderr.buffer.write(b'Warning - could not find file ' +
-+ filename + b'\n')
-
- if __name__ == '__main__':
- main()
-
diff --git a/meta/recipes-devtools/python/python3_3.3.0.bb b/meta/recipes-devtools/python/python3_3.3.2.bb
similarity index 96%
rename from meta/recipes-devtools/python/python3_3.3.0.bb
rename to meta/recipes-devtools/python/python3_3.3.2.bb
index 081586d..b92824e 100644
--- a/meta/recipes-devtools/python/python3_3.3.0.bb
+++ b/meta/recipes-devtools/python/python3_3.3.2.bb
@@ -14,9 +14,8 @@ file://070-dont-clean-ipkg-install.patch \
file://080-distutils-dont_adjust_files.patch \
file://110-enable-zlib.patch \
file://130-readline-setup.patch \
-file://140-verbose-sharedmods.patch \
file://150-fix-setupterm.patch \
-file://h2py-pr13032.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
${DISTRO_SRC_URI} \
"
@@ -31,10 +30,10 @@ SRC_URI += "\
file://python-3.3-multilib.patch \
file://shutil-follow-symlink-fix.patch \
"
-SRC_URI[md5sum] = "b3b2524f72409d919a4137826a870a8f"
-SRC_URI[sha256sum] = "15c113fd6c058712f05d31b4eff149d4d823b8e39ef5e37228dc5dc4f8716df9"
+SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
+SRC_URI[sha256sum] = "f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=d214581529e343354f8e23025bdf582d"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a7e738bb078a33a825ce4a0282f8cb31"
S = "${WORKDIR}/Python-${PV}"
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 14/20] distutils3.bbclass: Fix typo and use proper values for target sysroot
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (12 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 13/20] python3: Upgrade to 3.3.2 Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 15/20] python3, python3-native: Consider OE staging installation Khem Raj
` (6 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Since OE-Core times we now have machine specific sysroots
for targets unlike before when we used arch specific sysroots
so reflect that here
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/distutils3.bbclass | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index f118fa0..9c841e4 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -11,19 +11,18 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
distutils3_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
build_ext --include-dirs ${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \
- --library-dirs ${STAGING_LIBCDIR}/${PYTHON_DIR} \
+ --library-dirs ${STAGING_LIBDIR}/${PYTHON_DIR} \
${DISTUTILS_BUILD_EXT_ARGS} \
build ${DISTUTILS_BUILD_ARGS} || \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build_ext ${DISTUTILS_BUILD_ARGS} || \
bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
}
distutils3_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
}
@@ -33,7 +32,7 @@ distutils3_stage_all() {
STAGING_LIBDIR=${STAGING_LIBDIR} \
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
}
@@ -43,7 +42,7 @@ distutils3_do_install() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install execution failed."
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 15/20] python3, python3-native: Consider OE staging installation
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (13 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 14/20] distutils3.bbclass: Fix typo and use proper values for target sysroot Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 16/20] python3: Fix host include contamination issue Khem Raj
` (5 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
We use native python in disutils bbclass and this needs
to peek into target sysroot when building plugins in cross
environment. Otherwise anything that inherits distutils3.bbclass
will not build.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../python/python3-native_3.3.2.bb | 1 +
...2-distutils-prefix-is-inside-staging-area.patch | 78 ++++++++++++++
.../python/python3/python-3.3-multilib.patch | 120 +++++++++------------
meta/recipes-devtools/python/python3_3.3.2.bb | 1 +
4 files changed, 131 insertions(+), 69 deletions(-)
create mode 100644 meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
diff --git a/meta/recipes-devtools/python/python3-native_3.3.2.bb b/meta/recipes-devtools/python/python3-native_3.3.2.bb
index f7221ed..012deba 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.2.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.2.bb
@@ -5,6 +5,7 @@ PYTHON_MAJMIN = "3.3"
DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+file://12-distutils-prefix-is-inside-staging-area.patch \
file://000-cross-compile.patch \
file://020-dont-compile-python-files.patch \
file://030-fixup-include-dirs.patch \
diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
new file mode 100644
index 0000000..c5846a5
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
@@ -0,0 +1,78 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+# The proper prefix is inside our staging area.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+# Signed-off-by: Phil Blundell <philb@gnu.org>
+# Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: Python-3.3.2/Lib/distutils/sysconfig.py
+===================================================================
+--- Python-3.3.2.orig/Lib/distutils/sysconfig.py 2013-07-30 00:00:52.769749805 -0700
++++ Python-3.3.2/Lib/distutils/sysconfig.py 2013-07-30 00:16:22.545767248 -0700
+@@ -16,10 +16,11 @@
+ from .errors import DistutilsPlatformError
+
+ # These are needed in a couple of spots, so just compute them once.
+-PREFIX = os.path.normpath(sys.prefix)
+-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+-BASE_PREFIX = os.path.normpath(sys.base_prefix)
+-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
++PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
++EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
++BASE_PREFIX = os.path.normpath(sys.base_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
++BASE_EXEC_PREFIX= os.path.normpath(sys.base_exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
++
+
+ # Path to the base directory of the project. On Windows the binary may
+ # live in project/PCBuild9. If we're dealing with an x64 Windows build,
+@@ -93,7 +94,9 @@
+ If 'prefix' is supplied, use it instead of sys.base_prefix or
+ sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
+ """
+- if prefix is None:
++ if prefix is None and os.environ['STAGING_INCDIR'] != "":
++ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
++ elif prefix is None:
+ prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
+ if os.name == "posix":
+ if python_build:
+@@ -136,6 +139,12 @@
+ If 'prefix' is supplied, use it instead of sys.base_prefix or
+ sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
+ """
++ if prefix is None and os.environ['STAGING_LIBDIR'] != "":
++ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
++ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
++ else:
++ lib_basename = sys.lib
++
+ if prefix is None:
+ if standard_lib:
+ prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
+@@ -144,7 +153,7 @@
+
+ if os.name == "posix":
+ libpython = os.path.join(prefix,
+- "lib", "python" + get_python_version())
++ lib_basename, "python" + get_python_version())
+ if standard_lib:
+ return libpython
+ else:
+@@ -249,7 +258,7 @@
+ else:
+ # The name of the config.h file changed in 2.2
+ config_h = 'pyconfig.h'
+- return os.path.join(inc_dir, config_h)
++ return os.path.join(inc_dir, config_h).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
+
+
+ def get_makefile_filename():
+@@ -258,7 +267,7 @@
+ return os.path.join(_sys_home or project_base, "Makefile")
+ lib_dir = get_python_lib(plat_specific=0, standard_lib=1)
+ config_file = 'config-{}{}'.format(get_python_version(), build_flags)
+- return os.path.join(lib_dir, config_file, 'Makefile')
++ return os.path.join(lib_dir, config_file, 'Makefile').replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
+
+
+ def parse_config_h(fp, g=None):
diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index 426e299..679f49f 100644
--- a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -1,7 +1,7 @@
-Index: Python-3.3.0rc2/Include/pythonrun.h
+Index: Python-3.3.2/Include/pythonrun.h
===================================================================
---- Python-3.3.0rc2.orig/Include/pythonrun.h 2012-09-09 02:10:55.000000000 -0700
-+++ Python-3.3.0rc2/Include/pythonrun.h 2012-09-20 22:46:53.273124016 -0700
+--- Python-3.3.2.orig/Include/pythonrun.h 2013-05-15 09:32:54.000000000 -0700
++++ Python-3.3.2/Include/pythonrun.h 2013-07-27 16:19:54.099877246 -0700
@@ -181,6 +181,8 @@
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -11,10 +11,10 @@ Index: Python-3.3.0rc2/Include/pythonrun.h
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-3.3.0rc2/Lib/distutils/command/install.py
+Index: Python-3.3.2/Lib/distutils/command/install.py
===================================================================
---- Python-3.3.0rc2.orig/Lib/distutils/command/install.py 2012-09-09 02:10:56.000000000 -0700
-+++ Python-3.3.0rc2/Lib/distutils/command/install.py 2012-09-20 22:46:53.273124016 -0700
+--- Python-3.3.2.orig/Lib/distutils/command/install.py 2013-05-15 09:32:54.000000000 -0700
++++ Python-3.3.2/Lib/distutils/command/install.py 2013-07-27 16:19:54.099877246 -0700
@@ -25,6 +25,8 @@
from site import USER_SITE
HAS_USER_SITE = True
@@ -33,29 +33,11 @@ Index: Python-3.3.0rc2/Lib/distutils/command/install.py
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-3.3.0rc2/Lib/distutils/sysconfig.py
+Index: Python-3.3.2/Lib/pydoc.py
===================================================================
---- Python-3.3.0rc2.orig/Lib/distutils/sysconfig.py 2012-09-09 02:10:56.000000000 -0700
-+++ Python-3.3.0rc2/Lib/distutils/sysconfig.py 2012-09-20 22:46:53.273124016 -0700
-@@ -139,8 +139,11 @@
- prefix = plat_specific and EXEC_PREFIX or PREFIX
-
- if os.name == "posix":
-- libpython = os.path.join(prefix,
-- "lib", "python" + get_python_version())
-+ if plat_specific or standard_lib:
-+ lib = sys.lib
-+ else:
-+ lib = "lib"
-+ libpython = os.path.join(prefix, lib, "python" + get_python_version())
- if standard_lib:
- return libpython
- else:
-Index: Python-3.3.0rc2/Lib/pydoc.py
-===================================================================
---- Python-3.3.0rc2.orig/Lib/pydoc.py 2012-09-09 02:10:59.000000000 -0700
-+++ Python-3.3.0rc2/Lib/pydoc.py 2012-09-20 22:46:53.273124016 -0700
-@@ -369,7 +369,7 @@
+--- Python-3.3.2.orig/Lib/pydoc.py 2013-05-15 09:32:55.000000000 -0700
++++ Python-3.3.2/Lib/pydoc.py 2013-07-27 16:19:54.103877246 -0700
+@@ -372,7 +372,7 @@
docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
@@ -64,10 +46,10 @@ Index: Python-3.3.0rc2/Lib/pydoc.py
"python%d.%d" % sys.version_info[:2])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-3.3.0rc2/Lib/site.py
+Index: Python-3.3.2/Lib/site.py
===================================================================
---- Python-3.3.0rc2.orig/Lib/site.py 2012-09-09 02:10:59.000000000 -0700
-+++ Python-3.3.0rc2/Lib/site.py 2012-09-20 22:46:53.273124016 -0700
+--- Python-3.3.2.orig/Lib/site.py 2013-05-15 09:32:55.000000000 -0700
++++ Python-3.3.2/Lib/site.py 2013-07-27 16:19:54.103877246 -0700
@@ -303,13 +303,19 @@
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -91,11 +73,11 @@ Index: Python-3.3.0rc2/Lib/site.py
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
-Index: Python-3.3.0rc2/Lib/trace.py
+Index: Python-3.3.2/Lib/trace.py
===================================================================
---- Python-3.3.0rc2.orig/Lib/trace.py 2012-09-09 02:11:04.000000000 -0700
-+++ Python-3.3.0rc2/Lib/trace.py 2012-09-20 22:46:53.273124016 -0700
-@@ -750,10 +750,10 @@
+--- Python-3.3.2.orig/Lib/trace.py 2013-05-15 09:32:56.000000000 -0700
++++ Python-3.3.2/Lib/trace.py 2013-07-27 16:19:54.103877246 -0700
+@@ -751,10 +751,10 @@
# should I also call expanduser? (after all, could use $HOME)
s = s.replace("$prefix",
@@ -108,20 +90,20 @@ Index: Python-3.3.0rc2/Lib/trace.py
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-3.3.0rc2/Makefile.pre.in
+Index: Python-3.3.2/Makefile.pre.in
===================================================================
---- Python-3.3.0rc2.orig/Makefile.pre.in 2012-09-20 22:45:52.000000000 -0700
-+++ Python-3.3.0rc2/Makefile.pre.in 2012-09-20 22:46:53.277124015 -0700
-@@ -92,6 +92,8 @@
+--- Python-3.3.2.orig/Makefile.pre.in 2013-07-27 16:19:16.000000000 -0700
++++ Python-3.3.2/Makefile.pre.in 2013-07-27 16:19:54.103877246 -0700
+@@ -96,6 +96,8 @@
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
+LIB= @LIB@
+ARCH= @ARCH@
- # Install prefix for architecture-independent files
- prefix= @prefix@
-@@ -108,7 +110,7 @@
+ # Multiarch directory (may be empty)
+ MULTIARCH= @MULTIARCH@
+@@ -115,7 +117,7 @@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -130,7 +112,7 @@ Index: Python-3.3.0rc2/Makefile.pre.in
ABIFLAGS= @ABIFLAGS@
# Detailed destination directories
-@@ -618,6 +620,7 @@
+@@ -635,6 +637,7 @@
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -138,7 +120,7 @@ Index: Python-3.3.0rc2/Makefile.pre.in
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -669,7 +672,7 @@
+@@ -701,7 +704,7 @@
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -147,10 +129,10 @@ Index: Python-3.3.0rc2/Makefile.pre.in
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-3.3.0rc2/Modules/getpath.c
+Index: Python-3.3.2/Modules/getpath.c
===================================================================
---- Python-3.3.0rc2.orig/Modules/getpath.c 2012-09-09 02:11:09.000000000 -0700
-+++ Python-3.3.0rc2/Modules/getpath.c 2012-09-20 22:46:53.277124015 -0700
+--- Python-3.3.2.orig/Modules/getpath.c 2013-05-15 09:32:59.000000000 -0700
++++ Python-3.3.2/Modules/getpath.c 2013-07-27 16:19:54.107877246 -0700
@@ -121,9 +121,11 @@
#define EXEC_PREFIX PREFIX
#endif
@@ -174,10 +156,10 @@ Index: Python-3.3.0rc2/Modules/getpath.c
static void
reduce(wchar_t *dir)
-Index: Python-3.3.0rc2/Python/getplatform.c
+Index: Python-3.3.2/Python/getplatform.c
===================================================================
---- Python-3.3.0rc2.orig/Python/getplatform.c 2012-09-09 02:11:12.000000000 -0700
-+++ Python-3.3.0rc2/Python/getplatform.c 2012-09-20 22:46:53.277124015 -0700
+--- Python-3.3.2.orig/Python/getplatform.c 2013-05-15 09:33:00.000000000 -0700
++++ Python-3.3.2/Python/getplatform.c 2013-07-27 16:19:54.107877246 -0700
@@ -10,3 +10,23 @@
{
return PLATFORM;
@@ -202,10 +184,10 @@ Index: Python-3.3.0rc2/Python/getplatform.c
+{
+ return LIB;
+}
-Index: Python-3.3.0rc2/Python/sysmodule.c
+Index: Python-3.3.2/Python/sysmodule.c
===================================================================
---- Python-3.3.0rc2.orig/Python/sysmodule.c 2012-09-09 02:11:12.000000000 -0700
-+++ Python-3.3.0rc2/Python/sysmodule.c 2012-09-20 22:46:53.277124015 -0700
+--- Python-3.3.2.orig/Python/sysmodule.c 2013-05-15 09:33:00.000000000 -0700
++++ Python-3.3.2/Python/sysmodule.c 2013-07-27 16:19:54.107877246 -0700
@@ -1612,6 +1612,10 @@
PyUnicode_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
@@ -217,11 +199,11 @@ Index: Python-3.3.0rc2/Python/sysmodule.c
SET_SYS_FROM_STRING("executable",
PyUnicode_FromWideChar(
Py_GetProgramFullPath(), -1));
-Index: Python-3.3.0rc2/setup.py
+Index: Python-3.3.2/setup.py
===================================================================
---- Python-3.3.0rc2.orig/setup.py 2012-09-20 22:45:53.000000000 -0700
-+++ Python-3.3.0rc2/setup.py 2012-09-20 22:46:53.277124015 -0700
-@@ -462,7 +462,7 @@
+--- Python-3.3.2.orig/setup.py 2013-07-27 16:19:17.000000000 -0700
++++ Python-3.3.2/setup.py 2013-07-27 16:19:54.107877246 -0700
+@@ -439,7 +439,7 @@
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
if not cross_compiling:
@@ -230,7 +212,7 @@ Index: Python-3.3.0rc2/setup.py
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia
if cross_compiling:
-@@ -520,8 +520,7 @@
+@@ -497,8 +497,7 @@
# be assumed that no additional -I,-L directives are needed.
if not cross_compiling:
lib_dirs = self.compiler.library_dirs + [
@@ -239,8 +221,8 @@ Index: Python-3.3.0rc2/setup.py
+ '/' + sys.lib, '/usr/' + sys.lib,
]
inc_dirs = self.compiler.include_dirs + ['/usr/include']
- if cross_compiling:
-@@ -699,11 +698,11 @@
+ else:
+@@ -675,11 +674,11 @@
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
@@ -254,10 +236,10 @@ Index: Python-3.3.0rc2/setup.py
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
-Index: Python-3.3.0rc2/Lib/sysconfig.py
+Index: Python-3.3.2/Lib/sysconfig.py
===================================================================
---- Python-3.3.0rc2.orig/Lib/sysconfig.py 2012-09-09 02:11:00.000000000 -0700
-+++ Python-3.3.0rc2/Lib/sysconfig.py 2012-09-20 22:46:53.277124015 -0700
+--- Python-3.3.2.orig/Lib/sysconfig.py 2013-05-15 09:32:55.000000000 -0700
++++ Python-3.3.2/Lib/sysconfig.py 2013-07-27 16:19:54.111877246 -0700
@@ -21,10 +21,10 @@
_INSTALL_SCHEMES = {
@@ -300,13 +282,13 @@ Index: Python-3.3.0rc2/Lib/sysconfig.py
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data': '{userbase}',
-Index: Python-3.3.0b2/configure.ac
+Index: Python-3.3.2/configure.ac
===================================================================
---- Python-3.3.0b2.orig/configure.ac 2012-08-11 08:54:25.000000000 +0200
-+++ Python-3.3.0b2/configure.ac 2012-08-23 14:49:29.000000000 +0200
-@@ -746,6 +746,41 @@
- esac;;
- esac
+--- Python-3.3.2.orig/configure.ac 2013-05-15 09:33:00.000000000 -0700
++++ Python-3.3.2/configure.ac 2013-07-27 16:19:54.111877246 -0700
+@@ -769,6 +769,41 @@
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+ AC_SUBST(MULTIARCH)
+AC_SUBST(ARCH)
+AC_MSG_CHECKING(ARCH)
diff --git a/meta/recipes-devtools/python/python3_3.3.2.bb b/meta/recipes-devtools/python/python3_3.3.2.bb
index b92824e..768d44b 100644
--- a/meta/recipes-devtools/python/python3_3.3.2.bb
+++ b/meta/recipes-devtools/python/python3_3.3.2.bb
@@ -7,6 +7,7 @@ PYTHON_BINABI= "${PYTHON_MAJMIN}m"
DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+file://12-distutils-prefix-is-inside-staging-area.patch \
file://000-cross-compile.patch \
file://020-dont-compile-python-files.patch \
file://030-fixup-include-dirs.patch \
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 16/20] python3: Fix host include contamination issue
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (14 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 15/20] python3, python3-native: Consider OE staging installation Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 17/20] distutils3.bbclass: Use MACHINE for sysroot when not building for build host Khem Raj
` (4 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Let compiler append sysroot to include path if it can
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../python/python3-native_3.3.2.bb | 1 +
| 35 ++++++++++++++++++++++
meta/recipes-devtools/python/python3_3.3.2.bb | 1 +
3 files changed, 37 insertions(+)
create mode 100644 meta/recipes-devtools/python/python3/sysroot-include-headers.patch
diff --git a/meta/recipes-devtools/python/python3-native_3.3.2.bb b/meta/recipes-devtools/python/python3-native_3.3.2.bb
index 012deba..da8dc87 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.2.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.2.bb
@@ -20,6 +20,7 @@ file://avoid_warning_about_tkinter.patch \
file://06-ctypes-libffi-fix-configure.patch \
file://shutil-follow-symlink-fix.patch \
file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://sysroot-include-headers.patch \
${DISTRO_SRC_URI} \
"
SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
--git a/meta/recipes-devtools/python/python3/sysroot-include-headers.patch b/meta/recipes-devtools/python/python3/sysroot-include-headers.patch
new file mode 100644
index 0000000..785b556
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/sysroot-include-headers.patch
@@ -0,0 +1,35 @@
+Dont search hardcoded paths, we might be doing a cross-build
+Use '=' in-front to let compiler append sysroot, if it can
+
+Should fix things like
+
+configure:6972: arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -DNDEBUG -fno-inline -D__SOFTFP__ --sysroot=/build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone -c -O2 -pipe -g -feliminate-unused-debug-types -I/usr/include/ncursesw conftest.c >&5
+cc1: warning: include location "/usr/include/ncursesw" is unsafe for cross-compilation [-Wpoison-system-directories]
+
+
+Signed-off-by: Khem Raj
+Upstream-Status: Pending
+
+
+Index: Python-3.3.2/setup.py
+===================================================================
+--- Python-3.3.2.orig/setup.py 2013-07-30 01:30:48.000000000 -0700
++++ Python-3.3.2/setup.py 2013-07-30 01:41:11.697862723 -0700
+@@ -1210,7 +1210,7 @@
+ panel_library = 'panel'
+ if curses_library == 'ncursesw':
+ curses_defines.append(('HAVE_NCURSESW', '1'))
+- curses_includes.append('/usr/include/ncursesw')
++ curses_includes.append('=/usr/include/ncursesw')
+ # Bug 1464056: If _curses.so links with ncursesw,
+ # _curses_panel.so must link with panelw.
+ panel_library = 'panelw'
+@@ -1819,7 +1819,7 @@
+ if host_platform == 'darwin':
+ # OS X 10.5 comes with libffi.dylib; the include files are
+ # in /usr/include/ffi
+- inc_dirs.append('/usr/include/ffi')
++ inc_dirs.append('=/usr/include/ffi')
+
+ ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
+ if not ffi_inc or ffi_inc[0] == '':
diff --git a/meta/recipes-devtools/python/python3_3.3.2.bb b/meta/recipes-devtools/python/python3_3.3.2.bb
index 768d44b..fe423d3 100644
--- a/meta/recipes-devtools/python/python3_3.3.2.bb
+++ b/meta/recipes-devtools/python/python3_3.3.2.bb
@@ -30,6 +30,7 @@ SRC_URI += "\
file://host_include_contamination.patch \
file://python-3.3-multilib.patch \
file://shutil-follow-symlink-fix.patch \
+ file://sysroot-include-headers.patch \
"
SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
SRC_URI[sha256sum] = "f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a"
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 17/20] distutils3.bbclass: Use MACHINE for sysroot when not building for build host
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (15 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 16/20] python3: Fix host include contamination issue Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 18/20] python3: Fix the compiler invocation and linker flags when cross compiling Khem Raj
` (3 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Python's machinery replaces directories in sysroot path to match OE's
staging area sysroots. Earlier we use to have HOST_SYS represent sysroot
always but now we use MACHINE to represent target sysroots but HOST_SYS
to represent host sysroot. This patch caters to that difference
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/distutils3.bbclass | 41 +++++++++++++++++++++++++++++------------
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index 9c841e4..bbd645c 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -9,40 +9,57 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
--install-data=${D}/${datadir}"
distutils3_do_compile() {
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
- build_ext --include-dirs ${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \
- --library-dirs ${STAGING_LIBDIR}/${PYTHON_DIR} \
- ${DISTUTILS_BUILD_EXT_ARGS} \
- build ${DISTUTILS_BUILD_ARGS} || \
- bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
+ if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
+ SYS=${MACHINE}
+ else
+ SYS=${HOST_SYS}
+ fi
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
+ build ${DISTUTILS_BUILD_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
}
distutils3_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \
+ if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
+ SYS=${MACHINE}
+ else
+ SYS=${HOST_SYS}
+ fi
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
}
distutils3_stage_all() {
+ if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
+ SYS=${MACHINE}
+ else
+ SYS=${HOST_SYS}
+ fi
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
}
distutils3_do_install() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+ if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
+ SYS=${MACHINE}
+ else
+ SYS=${HOST_SYS}
+ fi
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install execution failed."
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 18/20] python3: Fix the compiler invocation and linker flags when cross compiling
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (16 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 17/20] distutils3.bbclass: Use MACHINE for sysroot when not building for build host Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 19/20] python: Add Patch description and status information Khem Raj
` (2 subsequent siblings)
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
The details are in patch header. This should fix the QA errors about
host contamination
Add virtual/libintl to dep list
There is use of libintl.h but we dont
express the dependency
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../python/python3-native_3.3.2.bb | 1 +
.../python/python3/unixccompiler.patch | 33 ++++++++++++++++++++++
meta/recipes-devtools/python/python3_3.3.2.bb | 3 +-
3 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/python/python3/unixccompiler.patch
diff --git a/meta/recipes-devtools/python/python3-native_3.3.2.bb b/meta/recipes-devtools/python/python3-native_3.3.2.bb
index da8dc87..d11ec51 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.2.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.2.bb
@@ -21,6 +21,7 @@ file://06-ctypes-libffi-fix-configure.patch \
file://shutil-follow-symlink-fix.patch \
file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
file://sysroot-include-headers.patch \
+file://unixccompiler.patch \
${DISTRO_SRC_URI} \
"
SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
diff --git a/meta/recipes-devtools/python/python3/unixccompiler.patch b/meta/recipes-devtools/python/python3/unixccompiler.patch
new file mode 100644
index 0000000..b2229b4
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/unixccompiler.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+The CC variable,sometimes like:"x86_64-poky-linux-gcc -m64 --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains option information.
+This will lead to wrong compiler name "qemux86-64" rather than "x86_64-poky-linux-gcc" when python finding the compiler name.
+
+Secondly add -L=<path> this way linker will be able to resolve /usr/lib w.r.t sysroot and not
+use hardcoded /usr/lib to look for libs which is wrong in cross compile environment and this will work
+ok on native systems too since sysroot for native compilers is /
+
+Signed-off-by: Mei Lei <lei.mei@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: Python-3.3.2/Lib/distutils/unixccompiler.py
+===================================================================
+--- Python-3.3.2.orig/Lib/distutils/unixccompiler.py 2013-05-15 09:32:54.000000000 -0700
++++ Python-3.3.2/Lib/distutils/unixccompiler.py 2013-08-01 00:58:18.629056286 -0700
+@@ -202,7 +202,7 @@
+ # ccompiler.py.
+
+ def library_dir_option(self, dir):
+- return "-L" + dir
++ return "-L=" + dir
+
+ def _is_gcc(self, compiler_name):
+ return "gcc" in compiler_name or "g++" in compiler_name
+@@ -221,7 +221,7 @@
+ # this time, there's no way to determine this information from
+ # the configuration data stored in the Python installation, so
+ # we use this hack.
+- compiler = os.path.basename(sysconfig.get_config_var("CC"))
++ compiler = sysconfig.get_config_var("CC")
+ if sys.platform[:6] == "darwin":
+ # MacOSX's linker doesn't understand the -R flag at all
+ return "-L" + dir
diff --git a/meta/recipes-devtools/python/python3_3.3.2.bb b/meta/recipes-devtools/python/python3_3.3.2.bb
index fe423d3..6ff32d8 100644
--- a/meta/recipes-devtools/python/python3_3.3.2.bb
+++ b/meta/recipes-devtools/python/python3_3.3.2.bb
@@ -1,6 +1,6 @@
require recipes-devtools/python/python.inc
-DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
+DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl"
PR = "${INC_PR}.0"
PYTHON_MAJMIN = "3.3"
PYTHON_BINABI= "${PYTHON_MAJMIN}m"
@@ -31,6 +31,7 @@ SRC_URI += "\
file://python-3.3-multilib.patch \
file://shutil-follow-symlink-fix.patch \
file://sysroot-include-headers.patch \
+ file://unixccompiler.patch \
"
SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
SRC_URI[sha256sum] = "f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a"
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 19/20] python: Add Patch description and status information
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (17 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 18/20] python3: Fix the compiler invocation and linker flags when cross compiling Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:15 ` [PATCH 20/20] python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc Khem Raj
2013-09-03 16:59 ` [PATCH V4 00/20] Add python 3 support Burton, Ross
20 siblings, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/python/python3/000-cross-compile.patch | 7 +++++++
.../python/python3/020-dont-compile-python-files.patch | 6 ++++++
meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch | 6 ++++++
.../python/python3/070-dont-clean-ipkg-install.patch | 6 ++++++
.../python/python3/080-distutils-dont_adjust_files.patch | 6 ++++++
meta/recipes-devtools/python/python3/110-enable-zlib.patch | 6 ++++++
meta/recipes-devtools/python/python3/130-readline-setup.patch | 6 ++++++
meta/recipes-devtools/python/python3/150-fix-setupterm.patch | 6 ++++++
meta/recipes-devtools/python/python3/python-3.3-multilib.patch | 6 ++++++
.../python/python3/shutil-follow-symlink-fix.patch | 6 ++++++
10 files changed, 61 insertions(+)
diff --git a/meta/recipes-devtools/python/python3/000-cross-compile.patch b/meta/recipes-devtools/python/python3/000-cross-compile.patch
index 23c1755..2506a59 100644
--- a/meta/recipes-devtools/python/python3/000-cross-compile.patch
+++ b/meta/recipes-devtools/python/python3/000-cross-compile.patch
@@ -1,3 +1,10 @@
+We cross compile python. This patch uses tools from host/native
+python instead of in-tree tools
+
+-Khem
+
+Upstream-Status: Inappropriate[Configuration Specific]
+
---
Makefile.pre.in | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
index 07a906e..03ef286 100644
--- a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
+++ b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
@@ -1,3 +1,9 @@
+Dont cross compile site packages
+
+-Khem
+
+Upstream-Status: Inappropriate[Embedded-Specific]
+
---
Makefile.pre.in | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
index 3e009c1..6beac7b 100644
--- a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
+++ b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
@@ -1,3 +1,9 @@
+Do not hardcode /usr into include paths when cross compiling
+
+-Khem
+
+Upstream-Status: Pending
+
---
setup.py | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
index 2ac85d9..789929b 100644
--- a/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
+++ b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
@@ -1,3 +1,9 @@
+consider opkg directories when cleaning up
+
+-Khem
+
+Upstream-Status: Inappropriate [OE specific]
+
---
Makefile.pre.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch
index ac5450b..b96419a 100644
--- a/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch
+++ b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch
@@ -1,3 +1,9 @@
+do not "adjust" python files before copying
+
+-Khem
+
+Upstream-Status: Inappropriate [Embedded-Specific]
+
---
Lib/distutils/command/build_scripts.py | 43 +++------------------------------
1 file changed, 4 insertions(+), 39 deletions(-)
diff --git a/meta/recipes-devtools/python/python3/110-enable-zlib.patch b/meta/recipes-devtools/python/python3/110-enable-zlib.patch
index 90c364e..fb92a19 100644
--- a/meta/recipes-devtools/python/python3/110-enable-zlib.patch
+++ b/meta/recipes-devtools/python/python3/110-enable-zlib.patch
@@ -1,3 +1,9 @@
+Enable zlib in python
+
+-Khem
+
+Upstream-Status: Inappropriate [OE-Specific]
+
---
Modules/Setup.dist | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/python/python3/130-readline-setup.patch b/meta/recipes-devtools/python/python3/130-readline-setup.patch
index 3d28a19..c805652 100644
--- a/meta/recipes-devtools/python/python3/130-readline-setup.patch
+++ b/meta/recipes-devtools/python/python3/130-readline-setup.patch
@@ -1,3 +1,9 @@
+package python-readline
+
+-Khem
+
+Upstream-Status: Inappropriate [Embedded Specific]
+
--- a/setup.py
+++ b/setup.py
@@ -666,45 +666,7 @@ class PyBuildExt(build_ext):
diff --git a/meta/recipes-devtools/python/python3/150-fix-setupterm.patch b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch
index db53482..78d7c78 100644
--- a/meta/recipes-devtools/python/python3/150-fix-setupterm.patch
+++ b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch
@@ -1,3 +1,9 @@
+Fix warning with newer compiler
+
+-Khem
+
+Upstream-Status: Pending
+
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -116,7 +116,7 @@ char *PyCursesVersion = "2.2";
diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index 679f49f..7d66a0e 100644
--- a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -1,3 +1,9 @@
+get the sys.lib from python itself and do not use hardcoded value of 'lib'
+
+-Khem
+
+Upstream-Status: Pending
+
Index: Python-3.3.2/Include/pythonrun.h
===================================================================
--- Python-3.3.2.orig/Include/pythonrun.h 2013-05-15 09:32:54.000000000 -0700
diff --git a/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch b/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch
index 0e4680e..802b1c7 100644
--- a/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch
+++ b/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch
@@ -1,3 +1,9 @@
+shutils should consider symlinks
+
+-Khem
+
+Upstream-Status: Pending
+
--- a/Lib/shutil.py 2013-01-29 12:31:06.926555779 -0800
+++ b/Lib/shutil.py 2013-01-29 16:31:39.097554182 -0800
@@ -132,7 +132,7 @@ def copymode(src, dst, *, follow_symlink
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 20/20] python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (18 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 19/20] python: Add Patch description and status information Khem Raj
@ 2013-08-27 17:15 ` Khem Raj
2013-08-27 17:49 ` Martin Jansa
2013-09-03 16:59 ` [PATCH V4 00/20] Add python 3 support Burton, Ross
20 siblings, 1 reply; 27+ messages in thread
From: Khem Raj @ 2013-08-27 17:15 UTC (permalink / raw)
To: openembedded-core
Fixes
and from test-dependencies.sh run there is undeterministic lzma
dependency:
WARN: packages/armv5te-oe-linux-gnueabi/python3/python3-misc/latest lost
dependency on liblzma
Reported-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/python/python3_3.3.2.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-devtools/python/python3_3.3.2.bb b/meta/recipes-devtools/python/python3_3.3.2.bb
index 6ff32d8..d2c7e37 100644
--- a/meta/recipes-devtools/python/python3_3.3.2.bb
+++ b/meta/recipes-devtools/python/python3_3.3.2.bb
@@ -197,6 +197,7 @@ FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
# catch all the rest (unsorted)
PACKAGES += "${PN}-misc"
FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+RDEPENDS_${PN}-misc = "liblzma"
# catch manpage
PACKAGES += "${PN}-man"
--
1.8.3.4
^ permalink raw reply related [flat|nested] 27+ messages in thread* Re: [PATCH V4 00/20] Add python 3 support
2013-08-27 17:11 [PATCH V4 00/20] Add python 3 support Khem Raj
` (19 preceding siblings ...)
2013-08-27 17:15 ` [PATCH 20/20] python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc Khem Raj
@ 2013-09-03 16:59 ` Burton, Ross
2013-09-03 17:04 ` Khem Raj
2013-09-05 4:18 ` Khem Raj
20 siblings, 2 replies; 27+ messages in thread
From: Burton, Ross @ 2013-09-03 16:59 UTC (permalink / raw)
To: Khem Raj; +Cc: OE-core
On 27 August 2013 18:15, Khem Raj <raj.khem@gmail.com> wrote:
> python3: Add recipes
> python3: Add native recipe
> python3: Upgrade to 3.3.2
> python3, python3-native: Consider OE staging installation
> python3: Fix host include contamination issue
> python3: Fix the compiler invocation and linker flags when cross
> compiling
> python: Add Patch description and status information
> python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
For bisecting and clarity, why can't all of those be squashed into
"add python 3"? I don't see the point of merging a broken Python 3
recipe and then six required fixes.
Ross
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [PATCH V4 00/20] Add python 3 support
2013-09-03 16:59 ` [PATCH V4 00/20] Add python 3 support Burton, Ross
@ 2013-09-03 17:04 ` Khem Raj
2013-09-05 4:18 ` Khem Raj
1 sibling, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-09-03 17:04 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On Tue, Sep 3, 2013 at 9:59 AM, Burton, Ross <ross.burton@intel.com> wrote:
> On 27 August 2013 18:15, Khem Raj <raj.khem@gmail.com> wrote:
>> python3: Add recipes
>> python3: Add native recipe
>> python3: Upgrade to 3.3.2
>> python3, python3-native: Consider OE staging installation
>> python3: Fix host include contamination issue
>> python3: Fix the compiler invocation and linker flags when cross
>> compiling
>> python: Add Patch description and status information
this one has more than python recipes and is cosmetic. I will leave it
alone since it will need breaking apart before squashing it into
individual recipes.
>> python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
>
> For bisecting and clarity, why can't all of those be squashed into
> "add python 3"? I don't see the point of merging a broken Python 3
> recipe and then six required fixes.
Depends how you look at it. I will squash rest into one.
>
> Ross
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH V4 00/20] Add python 3 support
2013-09-03 16:59 ` [PATCH V4 00/20] Add python 3 support Burton, Ross
2013-09-03 17:04 ` Khem Raj
@ 2013-09-05 4:18 ` Khem Raj
1 sibling, 0 replies; 27+ messages in thread
From: Khem Raj @ 2013-09-05 4:18 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On Sep 3, 2013, at 9:59 AM, "Burton, Ross" <ross.burton@intel.com> wrote:
> On 27 August 2013 18:15, Khem Raj <raj.khem@gmail.com> wrote:
>> python3: Add recipes
>> python3: Add native recipe
>> python3: Upgrade to 3.3.2
>> python3, python3-native: Consider OE staging installation
>> python3: Fix host include contamination issue
>> python3: Fix the compiler invocation and linker flags when cross
>> compiling
>> python: Add Patch description and status information
>> python3_3.3.2.bb: Add liblzma to RDEPENDS for python3-misc
>
> For bisecting and clarity, why can't all of those be squashed into
> "add python 3"? I don't see the point of merging a broken Python 3
> recipe and then six required fixes.
I have squashed all of the above patches into 1 and posted a V5 series.
Let me know if anything is still unsatisfactory
Thx
^ permalink raw reply [flat|nested] 27+ messages in thread