All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] Add python 3 support
@ 2014-01-30  4:09 Khem Raj
  2014-01-30  4:12 ` [PATCH 01/15] generate-manifest-3.3.py: Add script to generate python 3.3 manifests Khem Raj
                   ` (17 more replies)
  0 siblings, 18 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:09 UTC (permalink / raw)
  To: openembedded-core

Post V5

Upgrade to 3.3.3

Fix the warnings like

WARNING: The recipe python3 is trying to install files into a shared
area when those files already exist. Those files and their manifest
location are:

/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/include/python3.3m/pyconfig.h

/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/libpython3.3m.so.1.0

/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/libpython3.3m.so

/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python3.3/config/Makefile

and

WARNING: The recipe python-setuptools is trying to install files into a 
shared area when those files already exist. Those files and their 
manifest location are:
 
/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python2.7/site-packages/setuptools.pth
    Matched in manifest-qemux86-64-python-distribute
 
/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python2.7/site-packages/site.pyc
    Matched in manifest-qemux86-64-python-distribute
 
/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python2.7/site-packages/site.py
    Matched in manifest-qemux86-64-python-distribute


The following changes since commit c3f3fed1b397b6ee6d44e7d39e63d084e4a88e30:

  toaster.bbclass: save original package name (2014-01-29 17:40:29 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib kraj/python3
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/python3

Khem Raj (15):
  generate-manifest-3.3.py: Add script to generate python 3.3 manifests
  python-3.3-manifest: Add python3 manifest file
  python3native.bbclass: Add python3 abstraction class
  package_rpm.bbclass: Trigger the regexp on exact keyword match
  classes/distutils: Introduce PYTHON_PN
  classes: Add distutils for python3
  distutils: Introduce PYTHON_ABI variable
  distutils3: Do build_ext as separate step during compile
  python3: Add target and native recipes
  python_2.7.3.bb: Inherit python-dir
  python-distribute: Add recipes for python2 and python3
  distutils3.bbclass: Fix typo and use proper values for target sysroot
  distutils3.bbclass: Use MACHINE for sysroot when not building for
    build host
  python3: Fix staging warnings due to duplicate install
  python-setuptools: Remove its provided by python-distribute

 meta/classes/distutils-base.bbclass                |    5 +-
 meta/classes/distutils-native-base.bbclass         |    4 +-
 meta/classes/distutils-tools.bbclass               |   77 ++++
 meta/classes/distutils.bbclass                     |   23 +-
 meta/classes/distutils3-base.bbclass               |    8 +
 meta/classes/distutils3-native-base.bbclass        |    4 +
 meta/classes/distutils3.bbclass                    |   98 +++++
 meta/classes/package_rpm.bbclass                   |    2 +-
 meta/classes/python-dir.bbclass                    |    2 +
 meta/classes/python3native.bbclass                 |    7 +
 meta/classes/pythonnative.bbclass                  |    9 +-
 meta/classes/setuptools.bbclass                    |    3 +-
 meta/classes/setuptools3.bbclass                   |    8 +
 .../python/python-3.3-manifest.inc                 |  260 ++++++++++++++
 .../python/python-distribute_0.6.32.bb             |   50 +++
 .../python/python-setuptools_1.4.bb                |   40 ---
 .../python/python3-distribute_0.6.32.bb            |   49 +++
 .../python/python3-native_3.3.3.bb                 |   70 ++++
 .../python/python3/000-cross-compile.patch         |   83 +++++
 ...sue-13032-where-it-fails-with-UnicodeDeco.patch |   37 ++
 .../python3/020-dont-compile-python-files.patch    |   37 ++
 .../python/python3/03-fix-tkinter-detection.patch  |   42 +++
 .../python/python3/030-fixup-include-dirs.patch    |   33 ++
 .../python/python3/04-default-is-optimized.patch   |   58 +++
 .../python3/06-ctypes-libffi-fix-configure.patch   |   44 +++
 .../python3/070-dont-clean-ipkg-install.patch      |   36 ++
 .../python3/080-distutils-dont_adjust_files.patch  |   92 +++++
 .../python/python3/110-enable-zlib.patch           |   21 ++
 ...2-distutils-prefix-is-inside-staging-area.patch |   78 ++++
 .../python/python3/130-readline-setup.patch        |   55 +++
 .../python/python3/150-fix-setupterm.patch         |   17 +
 .../python3/avoid_warning_about_tkinter.patch      |   25 ++
 meta/recipes-devtools/python/python3/cgi_py.patch  |   23 ++
 .../python3/fix_for_using_different_libdir.patch   |   54 +++
 .../python3/host_include_contamination.patch       |   28 ++
 .../python/python3/python-3.3-multilib.patch       |  336 +++++++++++++++++
 .../python/python3/remove_sqlite_rpath.patch       |   19 +
 .../python/python3/setuptweaks.patch               |   57 +++
 .../python/python3/shutil-follow-symlink-fix.patch |   17 +
 .../python/python3/sitecustomize.py                |   37 ++
 .../sys_platform_is_now_always_linux2.patch        |   29 ++
 .../python/python3/sysroot-include-headers.patch   |   35 ++
 .../python/python3/unixccompiler.patch             |   33 ++
 meta/recipes-devtools/python/python3_3.3.3.bb      |  197 ++++++++++
 meta/recipes-devtools/python/python_2.7.3.bb       |    2 +-
 .../packagegroups/packagegroup-toolset-native.bb   |    2 +-
 scripts/contrib/python/generate-manifest-3.3.py    |  376 ++++++++++++++++++++
 47 files changed, 2558 insertions(+), 64 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/python3native.bbclass
 create mode 100644 meta/classes/setuptools3.bbclass
 create mode 100644 meta/recipes-devtools/python/python-3.3-manifest.inc
 create mode 100644 meta/recipes-devtools/python/python-distribute_0.6.32.bb
 delete mode 100644 meta/recipes-devtools/python/python-setuptools_1.4.bb
 create mode 100644 meta/recipes-devtools/python/python3-distribute_0.6.32.bb
 create mode 100644 meta/recipes-devtools/python/python3-native_3.3.3.bb
 create mode 100644 meta/recipes-devtools/python/python3/000-cross-compile.patch
 create mode 100644 meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.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/12-distutils-prefix-is-inside-staging-area.patch
 create mode 100644 meta/recipes-devtools/python/python3/130-readline-setup.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/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/sysroot-include-headers.patch
 create mode 100644 meta/recipes-devtools/python/python3/unixccompiler.patch
 create mode 100644 meta/recipes-devtools/python/python3_3.3.3.bb
 create mode 100755 scripts/contrib/python/generate-manifest-3.3.py

-- 
1.7.10.4



^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH 01/15] generate-manifest-3.3.py: Add script to generate python 3.3 manifests
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 02/15] python-3.3-manifest: Add python3 manifest file Khem Raj
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 02/15] python-3.3-manifest: Add python3 manifest file
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
  2014-01-30  4:12 ` [PATCH 01/15] generate-manifest-3.3.py: Add script to generate python 3.3 manifests Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 03/15] python3native.bbclass: Add python3 abstraction class Khem Raj
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 03/15] python3native.bbclass: Add python3 abstraction class
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
  2014-01-30  4:12 ` [PATCH 01/15] generate-manifest-3.3.py: Add script to generate python 3.3 manifests Khem Raj
  2014-01-30  4:12 ` [PATCH 02/15] python-3.3-manifest: Add python3 manifest file Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 04/15] package_rpm.bbclass: Trigger the regexp on exact keyword match Khem Raj
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 04/15] package_rpm.bbclass: Trigger the regexp on exact keyword match
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (2 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 03/15] python3native.bbclass: Add python3 abstraction class Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 05/15] classes/distutils: Introduce PYTHON_PN Khem Raj
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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 2d193b7..e9a6ac8 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -65,7 +65,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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 05/15] classes/distutils: Introduce PYTHON_PN
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (3 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 04/15] package_rpm.bbclass: Trigger the regexp on exact keyword match Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 06/15] classes: Add distutils for python3 Khem Raj
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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 80f6df8..f3da023 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 06/15] classes: Add distutils for python3
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (4 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 05/15] classes/distutils: Introduce PYTHON_PN Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 07/15] distutils: Introduce PYTHON_ABI variable Khem Raj
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 07/15] distutils: Introduce PYTHON_ABI variable
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (5 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 06/15] classes: Add distutils for python3 Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 08/15] distutils3: Do build_ext as separate step during compile Khem Raj
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 08/15] distutils3: Do build_ext as separate step during compile
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (6 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 07/15] distutils: Introduce PYTHON_ABI variable Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 09/15] python3: Add target and native recipes Khem Raj
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 09/15] python3: Add target and native recipes
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (7 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 08/15] distutils3: Do build_ext as separate step during compile Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 10/15] python_2.7.3.bb: Inherit python-dir Khem Raj
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 UTC (permalink / raw)
  To: openembedded-core

3.3.3 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.

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.

Fix host include contamination issue

Let compiler append sysroot to include path if it can

Fix the compiler invocation and linker flags when cross compiling

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

Add lzma dependency for python3-misc

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>
---
 .../python/python3-native_3.3.3.bb                 |   70 ++++
 .../python/python3/000-cross-compile.patch         |   83 +++++
 ...sue-13032-where-it-fails-with-UnicodeDeco.patch |   37 +++
 .../python3/020-dont-compile-python-files.patch    |   37 +++
 .../python/python3/03-fix-tkinter-detection.patch  |   42 +++
 .../python/python3/030-fixup-include-dirs.patch    |   33 ++
 .../python/python3/04-default-is-optimized.patch   |   58 ++++
 .../python3/06-ctypes-libffi-fix-configure.patch   |   44 +++
 .../python3/070-dont-clean-ipkg-install.patch      |   36 +++
 .../python3/080-distutils-dont_adjust_files.patch  |   92 ++++++
 .../python/python3/110-enable-zlib.patch           |   21 ++
 ...2-distutils-prefix-is-inside-staging-area.patch |   78 +++++
 .../python/python3/130-readline-setup.patch        |   55 ++++
 .../python/python3/150-fix-setupterm.patch         |   17 +
 .../python3/avoid_warning_about_tkinter.patch      |   25 ++
 meta/recipes-devtools/python/python3/cgi_py.patch  |   23 ++
 .../python3/fix_for_using_different_libdir.patch   |   54 ++++
 .../python3/host_include_contamination.patch       |   28 ++
 .../python/python3/python-3.3-multilib.patch       |  336 ++++++++++++++++++++
 .../python/python3/remove_sqlite_rpath.patch       |   19 ++
 .../python/python3/setuptweaks.patch               |   57 ++++
 .../python/python3/shutil-follow-symlink-fix.patch |   17 +
 .../python/python3/sitecustomize.py                |   37 +++
 .../sys_platform_is_now_always_linux2.patch        |   29 ++
 .../python/python3/sysroot-include-headers.patch   |   35 ++
 .../python/python3/unixccompiler.patch             |   33 ++
 meta/recipes-devtools/python/python3_3.3.3.bb      |  205 ++++++++++++
 27 files changed, 1601 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-native_3.3.3.bb
 create mode 100644 meta/recipes-devtools/python/python3/000-cross-compile.patch
 create mode 100644 meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.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/12-distutils-prefix-is-inside-staging-area.patch
 create mode 100644 meta/recipes-devtools/python/python3/130-readline-setup.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/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/sysroot-include-headers.patch
 create mode 100644 meta/recipes-devtools/python/python3/unixccompiler.patch
 create mode 100644 meta/recipes-devtools/python/python3_3.3.3.bb

diff --git a/meta/recipes-devtools/python/python3-native_3.3.3.bb b/meta/recipes-devtools/python/python3-native_3.3.3.bb
new file mode 100644
index 0000000..26b811f
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-native_3.3.3.bb
@@ -0,0 +1,70 @@
+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://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 \
+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://150-fix-setupterm.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 \
+file://sysroot-include-headers.patch \
+file://unixccompiler.patch \
+${DISTRO_SRC_URI} \
+"
+SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
+SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4eaea08eaaf6875189b0c49f26fa2005"
+
+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
+}
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..2506a59
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/000-cross-compile.patch
@@ -0,0 +1,83 @@
+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(-)
+
+--- 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/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/020-dont-compile-python-files.patch b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
new file mode 100644
index 0000000..03ef286
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
@@ -0,0 +1,37 @@
+Dont cross compile site packages
+
+-Khem
+
+Upstream-Status: Inappropriate[Embedded-Specific]
+
+---
+ 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..6beac7b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch
@@ -0,0 +1,33 @@
+Do not hardcode /usr into include paths when cross compiling
+
+-Khem
+
+Upstream-Status: Pending
+ 
+---
+ setup.py |   15 ++-------------
+ 1 file changed, 2 insertions(+), 13 deletions(-)
+
+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()
+-        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.
+@@ -480,7 +481,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
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..789929b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
@@ -0,0 +1,36 @@
+consider opkg directories when cleaning up
+
+-Khem
+
+Upstream-Status: Inappropriate [OE specific]
+
+---
+ 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..b96419a
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch
@@ -0,0 +1,92 @@
+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(-)
+
+--- 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..fb92a19
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/110-enable-zlib.patch
@@ -0,0 +1,21 @@
+Enable zlib in python
+
+-Khem
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+---
+ 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/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/130-readline-setup.patch b/meta/recipes-devtools/python/python3/130-readline-setup.patch
new file mode 100644
index 0000000..c805652
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/130-readline-setup.patch
@@ -0,0 +1,55 @@
+package python-readline
+
+-Khem
+
+Upstream-Status: Inappropriate [Embedded Specific]
+
+--- 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/150-fix-setupterm.patch b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch
new file mode 100644
index 0000000..78d7c78
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch
@@ -0,0 +1,17 @@
+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";
+     #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/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..7d66a0e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -0,0 +1,336 @@
+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
++++ 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);
+ 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.2/Lib/distutils/command/install.py
+===================================================================
+--- 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
+ 
++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.2/Lib/pydoc.py
+===================================================================
+--- 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)
+ 
+-        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.2/Lib/site.py
+===================================================================
+--- 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"))
+         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.2/Lib/trace.py
+===================================================================
+--- 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",
+-                              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.2/Makefile.pre.in
+===================================================================
+--- 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@
+ 
+ # Multiarch directory (may be empty)
+ MULTIARCH=	@MULTIARCH@
+@@ -115,7 +117,7 @@
+ MANDIR=		@mandir@
+ INCLUDEDIR=	@includedir@
+ CONFINCLUDEDIR=	$(exec_prefix)/include
+-SCRIPTDIR=	$(prefix)/lib
++SCRIPTDIR=	@libdir@
+ ABIFLAGS=	@ABIFLAGS@
+ 
+ # Detailed destination directories
+@@ -635,6 +637,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
+@@ -701,7 +704,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.2/Modules/getpath.c
+===================================================================
+--- 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
+ 
++#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.2/Python/getplatform.c
+===================================================================
+--- 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;
+ }
++
++#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.2/Python/sysmodule.c
+===================================================================
+--- 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",
+                         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.2/setup.py
+===================================================================
+--- 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:
+-            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:
+@@ -497,8 +497,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']
+         else:
+@@ -675,11 +674,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.2/Lib/sysconfig.py
+===================================================================
+--- 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 = {
+     '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.2/configure.ac
+===================================================================
+--- 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)
++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..802b1c7
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/shutil-follow-symlink-fix.patch
@@ -0,0 +1,17 @@
+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
+     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/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/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.3.bb b/meta/recipes-devtools/python/python3_3.3.3.bb
new file mode 100644
index 0000000..643df9e
--- /dev/null
+++ b/meta/recipes-devtools/python/python3_3.3.3.bb
@@ -0,0 +1,205 @@
+require recipes-devtools/python/python.inc
+
+DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
+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://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 \
+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://150-fix-setupterm.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.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 \
+            file://sysroot-include-headers.patch \
+            file://unixccompiler.patch \
+           "
+SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
+SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4eaea08eaaf6875189b0c49f26fa2005"
+
+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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 10/15] python_2.7.3.bb: Inherit python-dir
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (8 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 09/15] python3: Add target and native recipes Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 11/15] python-distribute: Add recipes for python2 and python3 Khem Raj
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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 340f5f3..ae4a1a6 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -37,7 +37,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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 11/15] python-distribute: Add recipes for python2 and python3
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (9 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 10/15] python_2.7.3.bb: Inherit python-dir Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 12/15] distutils3.bbclass: Fix typo and use proper values for target sysroot Khem Raj
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 12/15] distutils3.bbclass: Fix typo and use proper values for target sysroot
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (10 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 11/15] python-distribute: Add recipes for python2 and python3 Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 13/15] distutils3.bbclass: Use MACHINE for sysroot when not building for build host Khem Raj
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 13/15] distutils3.bbclass: Use MACHINE for sysroot when not building for build host
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (11 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 12/15] distutils3.bbclass: Fix typo and use proper values for target sysroot Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 14/15] python3: Fix staging warnings due to duplicate install Khem Raj
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 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.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 14/15] python3: Fix staging warnings due to duplicate install
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (12 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 13/15] distutils3.bbclass: Use MACHINE for sysroot when not building for build host Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  4:12 ` [PATCH 15/15] python-setuptools: Remove its provided by python-distribute Khem Raj
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 UTC (permalink / raw)
  To: openembedded-core

This fixes the warnings like

WARNING: The recipe python3 is trying to install files into a shared
area when those files already exist. Those files and their manifest
location are:

builds/world/tmp/sysroots/qemux86-64/usr/include/python3.3m/pyconfig.h
builds/world/tmp/sysroots/qemux86-64/usr/lib/libpython3.3m.so.1.0
builds/world/tmp/sysroots/qemux86-64/usr/lib/libpython3.3m.so
builds/world/tmp/sysroots/qemux86-64/usr/lib/python3.3/config/Makefile

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/python/python3_3.3.3.bb |   20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-devtools/python/python3_3.3.3.bb b/meta/recipes-devtools/python/python3_3.3.3.bb
index 643df9e..68b81d8 100644
--- a/meta/recipes-devtools/python/python3_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3_3.3.3.bb
@@ -75,17 +75,6 @@ do_compile() {
         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
 
@@ -103,7 +92,6 @@ do_compile() {
 		-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
@@ -120,8 +108,6 @@ do_compile() {
 		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} \
@@ -163,12 +149,18 @@ do_install() {
 	oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
 }
 
+do_install_append_class-nativesdk () {
+	create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
 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
+	# Remove references to buildmachine paths in target Makefile
+	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
 }
 
 require python-${PYTHON_MAJMIN}-manifest.inc
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 15/15] python-setuptools: Remove its provided by python-distribute
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (13 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 14/15] python3: Fix staging warnings due to duplicate install Khem Raj
@ 2014-01-30  4:12 ` Khem Raj
  2014-01-30  9:04 ` [PATCH 00/15] Add python 3 support Khem Raj
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  4:12 UTC (permalink / raw)
  To: openembedded-core

Use python-distribute-native in packagegroup-toolset-native

Also fixes warnings like

WARNING: The recipe python-setuptools is trying to install files into a
shared area when those files already exist. Those files and their
manifest location are:

/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python2.7/site-packages/setuptools.pth
    Matched in manifest-qemux86-64-python-distribute

/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python2.7/site-packages/site.pyc
    Matched in manifest-qemux86-64-python-distribute

/srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python2.7/site-packages/site.py
    Matched in manifest-qemux86-64-python-distribute

Signed-off-by: Khem Raj <raj.khem@gmail.com>

Conflicts:
	meta/recipes-devtools/python/python-setuptools_1.4.bb
---
 .../python/python-distribute_0.6.32.bb             |    3 ++
 .../python/python-setuptools_1.4.bb                |   40 --------------------
 .../python/python3-distribute_0.6.32.bb            |    2 +
 .../packagegroups/packagegroup-toolset-native.bb   |    2 +-
 4 files changed, 6 insertions(+), 41 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python-setuptools_1.4.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
index 86ac871..21af29d 100644
--- a/meta/recipes-devtools/python/python-distribute_0.6.32.bb
+++ b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
@@ -41,6 +41,9 @@ RDEPENDS_${PN} = "\
   python-compression \
 "
 
+PROVIDES += "python-setuptools"
+
+
 SRC_URI[md5sum] = "acb7a2da81e3612bfb1608abe4f0e568"
 SRC_URI[sha256sum] = "8970cd1e148b5d1fea9430584aea66c45ea22d80e0933393ec49ebc388f718df"
 
diff --git a/meta/recipes-devtools/python/python-setuptools_1.4.bb b/meta/recipes-devtools/python/python-setuptools_1.4.bb
deleted file mode 100644
index 4138d28..0000000
--- a/meta/recipes-devtools/python/python-setuptools_1.4.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Downloads, builds, installs, upgrades, and uninstalls Python packages"
-HOMEPAGE = "http://cheeseshop.python.org/pypi/setuptools"
-SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://setup.py;beginline=107;endline=107;md5=8a314270dd7a8dbca741775415f1716e"
-
-SRCNAME = "setuptools"
-DEPENDS += "python"
-DEPENDS_class-native += "python-native"
-
-SRC_URI = "\
-  http://cheeseshop.python.org/packages/source/s/setuptools/${SRCNAME}-${PV}.tar.gz\
-"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
-do_install_prepend() {
-    install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
-}
-
-RDEPENDS_${PN} = "\
-  python-stringold \
-  python-email \
-  python-shell \
-  python-distutils \
-  python-compression \
-"
-
-RDEPENDS_${PN}_class-native = "\
-  python-distutils \
-  python-compression \
-"
-
-SRC_URI[md5sum] = "5710464bc5a61d75f5087f15ce63cfe0"
-SRC_URI[sha256sum] = "75d288687066ed124311d6ca5f40ffa92a0e81adcd7fff318c6e84082713cf39"
-
-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
index 31fc56d..79e3cfc 100644
--- a/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
+++ b/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
@@ -41,6 +41,8 @@ RDEPENDS_${PN} = "\
   python3-compression \
 "
 
+PROVIDES += "python3-setuptools"
+
 SRC_URI[md5sum] = "acb7a2da81e3612bfb1608abe4f0e568"
 SRC_URI[sha256sum] = "8970cd1e148b5d1fea9430584aea66c45ea22d80e0933393ec49ebc388f718df"
 
diff --git a/meta/recipes-gnome/packagegroups/packagegroup-toolset-native.bb b/meta/recipes-gnome/packagegroups/packagegroup-toolset-native.bb
index 07d4f1d..f08cf1d 100644
--- a/meta/recipes-gnome/packagegroups/packagegroup-toolset-native.bb
+++ b/meta/recipes-gnome/packagegroups/packagegroup-toolset-native.bb
@@ -185,7 +185,7 @@ DEPENDS = "\
     python-pygobject-native \
     python-pyrex-native \
     python-scons-native \
-    python-setuptools-native \
+    python-distribute-native \
     python-smartpm-native \
     qemu-helper-native \
     qemu-native \
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 00/15] Add python 3 support
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (14 preceding siblings ...)
  2014-01-30  4:12 ` [PATCH 15/15] python-setuptools: Remove its provided by python-distribute Khem Raj
@ 2014-01-30  9:04 ` Khem Raj
  2014-01-30 18:14 ` Burton, Ross
  2014-02-03 12:03 ` Paul Eggleton
  17 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-30  9:04 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, Jan 29, 2014 at 8:12 PM, Khem Raj <raj.khem@gmail.com> wrote:
> Post V5
>
> Upgrade to 3.3.3
>
> Fix the warnings like
>
> WARNING: The recipe python3 is trying to install files into a shared
> area when those files already exist. Those files and their manifest
> location are:
>
> /srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/include/python3.3m/pyconfig.h
>
> /srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/libpython3.3m.so.1.0
>
> /srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/libpython3.3m.so
>
> /srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python3.3/config/Makefile
>
> and
>
> WARNING: The recipe python-setuptools is trying to install files into a
> shared area when those files already exist. Those files and their
> manifest location are:
>
> /srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python2.7/site-packages/setuptools.pth
>     Matched in manifest-qemux86-64-python-distribute
>
> /srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python2.7/site-packages/site.pyc
>     Matched in manifest-qemux86-64-python-distribute
>
> /srv/ssd/sgw/builds/world/tmp/sysroots/qemux86-64/usr/lib/python2.7/site-packages/site.py
>     Matched in manifest-qemux86-64-python-distribute
>

I have fixed two more issues 1 where cross build failed on hosts which
had ncursesw installed
secondly the in tree python modules (.so) were not being built due to
wrong linker paths

I have updated the pull branch with these two fixes.

>
> The following changes since commit c3f3fed1b397b6ee6d44e7d39e63d084e4a88e30:
>
>   toaster.bbclass: save original package name (2014-01-29 17:40:29 +0000)
>
> are available in the git repository at:
>
>   git://git.openembedded.org/openembedded-core-contrib kraj/python3
>   http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/python3
>
> Khem Raj (15):
>   generate-manifest-3.3.py: Add script to generate python 3.3 manifests
>   python-3.3-manifest: Add python3 manifest file
>   python3native.bbclass: Add python3 abstraction class
>   package_rpm.bbclass: Trigger the regexp on exact keyword match
>   classes/distutils: Introduce PYTHON_PN
>   classes: Add distutils for python3
>   distutils: Introduce PYTHON_ABI variable
>   distutils3: Do build_ext as separate step during compile
>   python3: Add target and native recipes
>   python_2.7.3.bb: Inherit python-dir
>   python-distribute: Add recipes for python2 and python3
>   distutils3.bbclass: Fix typo and use proper values for target sysroot
>   distutils3.bbclass: Use MACHINE for sysroot when not building for
>     build host
>   python3: Fix staging warnings due to duplicate install
>   python-setuptools: Remove its provided by python-distribute
>
>  meta/classes/distutils-base.bbclass                |    5 +-
>  meta/classes/distutils-native-base.bbclass         |    4 +-
>  meta/classes/distutils-tools.bbclass               |   77 ++++
>  meta/classes/distutils.bbclass                     |   23 +-
>  meta/classes/distutils3-base.bbclass               |    8 +
>  meta/classes/distutils3-native-base.bbclass        |    4 +
>  meta/classes/distutils3.bbclass                    |   98 +++++
>  meta/classes/package_rpm.bbclass                   |    2 +-
>  meta/classes/python-dir.bbclass                    |    2 +
>  meta/classes/python3native.bbclass                 |    7 +
>  meta/classes/pythonnative.bbclass                  |    9 +-
>  meta/classes/setuptools.bbclass                    |    3 +-
>  meta/classes/setuptools3.bbclass                   |    8 +
>  .../python/python-3.3-manifest.inc                 |  260 ++++++++++++++
>  .../python/python-distribute_0.6.32.bb             |   50 +++
>  .../python/python-setuptools_1.4.bb                |   40 ---
>  .../python/python3-distribute_0.6.32.bb            |   49 +++
>  .../python/python3-native_3.3.3.bb                 |   70 ++++
>  .../python/python3/000-cross-compile.patch         |   83 +++++
>  ...sue-13032-where-it-fails-with-UnicodeDeco.patch |   37 ++
>  .../python3/020-dont-compile-python-files.patch    |   37 ++
>  .../python/python3/03-fix-tkinter-detection.patch  |   42 +++
>  .../python/python3/030-fixup-include-dirs.patch    |   33 ++
>  .../python/python3/04-default-is-optimized.patch   |   58 +++
>  .../python3/06-ctypes-libffi-fix-configure.patch   |   44 +++
>  .../python3/070-dont-clean-ipkg-install.patch      |   36 ++
>  .../python3/080-distutils-dont_adjust_files.patch  |   92 +++++
>  .../python/python3/110-enable-zlib.patch           |   21 ++
>  ...2-distutils-prefix-is-inside-staging-area.patch |   78 ++++
>  .../python/python3/130-readline-setup.patch        |   55 +++
>  .../python/python3/150-fix-setupterm.patch         |   17 +
>  .../python3/avoid_warning_about_tkinter.patch      |   25 ++
>  meta/recipes-devtools/python/python3/cgi_py.patch  |   23 ++
>  .../python3/fix_for_using_different_libdir.patch   |   54 +++
>  .../python3/host_include_contamination.patch       |   28 ++
>  .../python/python3/python-3.3-multilib.patch       |  336 +++++++++++++++++
>  .../python/python3/remove_sqlite_rpath.patch       |   19 +
>  .../python/python3/setuptweaks.patch               |   57 +++
>  .../python/python3/shutil-follow-symlink-fix.patch |   17 +
>  .../python/python3/sitecustomize.py                |   37 ++
>  .../sys_platform_is_now_always_linux2.patch        |   29 ++
>  .../python/python3/sysroot-include-headers.patch   |   35 ++
>  .../python/python3/unixccompiler.patch             |   33 ++
>  meta/recipes-devtools/python/python3_3.3.3.bb      |  197 ++++++++++
>  meta/recipes-devtools/python/python_2.7.3.bb       |    2 +-
>  .../packagegroups/packagegroup-toolset-native.bb   |    2 +-
>  scripts/contrib/python/generate-manifest-3.3.py    |  376 ++++++++++++++++++++
>  47 files changed, 2558 insertions(+), 64 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/python3native.bbclass
>  create mode 100644 meta/classes/setuptools3.bbclass
>  create mode 100644 meta/recipes-devtools/python/python-3.3-manifest.inc
>  create mode 100644 meta/recipes-devtools/python/python-distribute_0.6.32.bb
>  delete mode 100644 meta/recipes-devtools/python/python-setuptools_1.4.bb
>  create mode 100644 meta/recipes-devtools/python/python3-distribute_0.6.32.bb
>  create mode 100644 meta/recipes-devtools/python/python3-native_3.3.3.bb
>  create mode 100644 meta/recipes-devtools/python/python3/000-cross-compile.patch
>  create mode 100644 meta/recipes-devtools/python/python3/0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.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/12-distutils-prefix-is-inside-staging-area.patch
>  create mode 100644 meta/recipes-devtools/python/python3/130-readline-setup.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/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/sysroot-include-headers.patch
>  create mode 100644 meta/recipes-devtools/python/python3/unixccompiler.patch
>  create mode 100644 meta/recipes-devtools/python/python3_3.3.3.bb
>  create mode 100755 scripts/contrib/python/generate-manifest-3.3.py
>
> --
> 1.7.10.4
>


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 00/15] Add python 3 support
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (15 preceding siblings ...)
  2014-01-30  9:04 ` [PATCH 00/15] Add python 3 support Khem Raj
@ 2014-01-30 18:14 ` Burton, Ross
  2014-01-30 18:26   ` Khem Raj
  2014-02-03 12:03 ` Paul Eggleton
  17 siblings, 1 reply; 23+ messages in thread
From: Burton, Ross @ 2014-01-30 18:14 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core

On 30 January 2014 04:09, Khem Raj <raj.khem@gmail.com> wrote:
>   classes: Add distutils for python3
>   distutils3: Do build_ext as separate step during compile
>   distutils3.bbclass: Fix typo and use proper values for target sysroot
>   distutils3.bbclass: Use MACHINE for sysroot when not building for
>     build host

Please try and squash patches like this set that simply fix bugs in
previous patches.

Ross


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 00/15] Add python 3 support
  2014-01-30 18:14 ` Burton, Ross
@ 2014-01-30 18:26   ` Khem Raj
  2014-01-31 21:45     ` Khem Raj
  0 siblings, 1 reply; 23+ messages in thread
From: Khem Raj @ 2014-01-30 18:26 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Thu, Jan 30, 2014 at 10:14 AM, Burton, Ross <ross.burton@intel.com> wrote:
> On 30 January 2014 04:09, Khem Raj <raj.khem@gmail.com> wrote:
>>   classes: Add distutils for python3
>>   distutils3: Do build_ext as separate step during compile
>>   distutils3.bbclass: Fix typo and use proper values for target sysroot
>>   distutils3.bbclass: Use MACHINE for sysroot when not building for
>>     build host
>
> Please try and squash patches like this set that simply fix bugs in
> previous patches.

Thanks, updated pull branch which squashed them and also another set
of 4 python3 recipe specific patches

>
> Ross


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 00/15] Add python 3 support
  2014-01-30 18:26   ` Khem Raj
@ 2014-01-31 21:45     ` Khem Raj
  0 siblings, 0 replies; 23+ messages in thread
From: Khem Raj @ 2014-01-31 21:45 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

There was another report where collections were packaged in python3-misc which
make python3 to not work without installing python3-misc I have fixed
that and updated
the pull tree.

On Thu, Jan 30, 2014 at 10:26 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On Thu, Jan 30, 2014 at 10:14 AM, Burton, Ross <ross.burton@intel.com> wrote:
>> On 30 January 2014 04:09, Khem Raj <raj.khem@gmail.com> wrote:
>>>   classes: Add distutils for python3
>>>   distutils3: Do build_ext as separate step during compile
>>>   distutils3.bbclass: Fix typo and use proper values for target sysroot
>>>   distutils3.bbclass: Use MACHINE for sysroot when not building for
>>>     build host
>>
>> Please try and squash patches like this set that simply fix bugs in
>> previous patches.
>
> Thanks, updated pull branch which squashed them and also another set
> of 4 python3 recipe specific patches
>
>>
>> Ross


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 00/15] Add python 3 support
  2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
                   ` (16 preceding siblings ...)
  2014-01-30 18:14 ` Burton, Ross
@ 2014-02-03 12:03 ` Paul Eggleton
  2014-02-03 16:49   ` Khem Raj
  17 siblings, 1 reply; 23+ messages in thread
From: Paul Eggleton @ 2014-02-03 12:03 UTC (permalink / raw)
  To: Khem Raj; +Cc: Scott Rifenbark, openembedded-core

Hi Khem,

On Wednesday 29 January 2014 20:12:24 Khem Raj wrote:
> Post V5
> 
> Upgrade to 3.3.3

I see this series has been merged at last - great! Could you also send Scott 
some information about documentation changes that we should have for this?

Thanks,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 00/15] Add python 3 support
  2014-02-03 12:03 ` Paul Eggleton
@ 2014-02-03 16:49   ` Khem Raj
  2014-02-03 16:55     ` Paul Eggleton
  0 siblings, 1 reply; 23+ messages in thread
From: Khem Raj @ 2014-02-03 16:49 UTC (permalink / raw)
  To: Paul Eggleton
  Cc: Scott Rifenbark, Patches and discussions about the oe-core layer

On Mon, Feb 3, 2014 at 4:03 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> Hi Khem,
>
> On Wednesday 29 January 2014 20:12:24 Khem Raj wrote:
>> Post V5
>>
>> Upgrade to 3.3.3
>
> I see this series has been merged at last - great! Could you also send Scott
> some information about documentation changes that we should have for this?

I will send another patch to define a python3 packagegroup and I think
it would be then
good to document how to include python3 feature in images.

>
> Thanks,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 00/15] Add python 3 support
  2014-02-03 16:49   ` Khem Raj
@ 2014-02-03 16:55     ` Paul Eggleton
  0 siblings, 0 replies; 23+ messages in thread
From: Paul Eggleton @ 2014-02-03 16:55 UTC (permalink / raw)
  To: Khem Raj; +Cc: Scott Rifenbark, Patches and discussions about the oe-core layer

On Monday 03 February 2014 08:49:36 Khem Raj wrote:
> On Mon, Feb 3, 2014 at 4:03 AM, Paul Eggleton
> <paul.eggleton@linux.intel.com> wrote:
> > I see this series has been merged at last - great! Could you also send
> > Scott some information about documentation changes that we should have
> > for this?
>
> I will send another patch to define a python3 packagegroup and I think
> it would be then
> good to document how to include python3 feature in images.

Well, there's that, but you've also additional variables (e.g. PYTHON_ABI and 
PYTHON_PN).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2014-02-03 16:56 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30  4:09 [PATCH 00/15] Add python 3 support Khem Raj
2014-01-30  4:12 ` [PATCH 01/15] generate-manifest-3.3.py: Add script to generate python 3.3 manifests Khem Raj
2014-01-30  4:12 ` [PATCH 02/15] python-3.3-manifest: Add python3 manifest file Khem Raj
2014-01-30  4:12 ` [PATCH 03/15] python3native.bbclass: Add python3 abstraction class Khem Raj
2014-01-30  4:12 ` [PATCH 04/15] package_rpm.bbclass: Trigger the regexp on exact keyword match Khem Raj
2014-01-30  4:12 ` [PATCH 05/15] classes/distutils: Introduce PYTHON_PN Khem Raj
2014-01-30  4:12 ` [PATCH 06/15] classes: Add distutils for python3 Khem Raj
2014-01-30  4:12 ` [PATCH 07/15] distutils: Introduce PYTHON_ABI variable Khem Raj
2014-01-30  4:12 ` [PATCH 08/15] distutils3: Do build_ext as separate step during compile Khem Raj
2014-01-30  4:12 ` [PATCH 09/15] python3: Add target and native recipes Khem Raj
2014-01-30  4:12 ` [PATCH 10/15] python_2.7.3.bb: Inherit python-dir Khem Raj
2014-01-30  4:12 ` [PATCH 11/15] python-distribute: Add recipes for python2 and python3 Khem Raj
2014-01-30  4:12 ` [PATCH 12/15] distutils3.bbclass: Fix typo and use proper values for target sysroot Khem Raj
2014-01-30  4:12 ` [PATCH 13/15] distutils3.bbclass: Use MACHINE for sysroot when not building for build host Khem Raj
2014-01-30  4:12 ` [PATCH 14/15] python3: Fix staging warnings due to duplicate install Khem Raj
2014-01-30  4:12 ` [PATCH 15/15] python-setuptools: Remove its provided by python-distribute Khem Raj
2014-01-30  9:04 ` [PATCH 00/15] Add python 3 support Khem Raj
2014-01-30 18:14 ` Burton, Ross
2014-01-30 18:26   ` Khem Raj
2014-01-31 21:45     ` Khem Raj
2014-02-03 12:03 ` Paul Eggleton
2014-02-03 16:49   ` Khem Raj
2014-02-03 16:55     ` Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.