generate-manifest-3.3.py: Add script to generate python 3.3 manifests

Bases on python 2.7.x generator

Signed-off-by: Khem Raj <raj.khem@gmail.com>
python-3.3-manifest: Add python3 manifest file

Signed-off-by: Khem Raj <raj.khem@gmail.com>
python3native.bbclass: Add python3 abstraction class

Signed-off-by: Khem Raj <raj.khem@gmail.com>
package_rpm.bbclass: Trigger the regexp on exact keyword match

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>
classes/distutils: Introduce PYTHON_PN

This is needed to accomodate python3 alongside
python2

Signed-off-by: Khem Raj <raj.khem@gmail.com>
classes: Add distutils for python3

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>
distutils: Introduce PYTHON_ABI variable

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>
distutils3: Do build_ext as separate step during compile

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>
python3: Add target and native recipes

3.3.2 is latest bugfix release in 3.3 series

License text is changed to reflect year and prev releases

+++ ../Python-3.3.2/LICENSE     2013-05-15 09:32:54.000000000 -0700
@@ -74,7 +74,9 @@
     3.2.1           3.2         2011        PSF         yes
     3.2.2           3.2.1       2011        PSF         yes
     3.2.3           3.2.2       2012        PSF         yes
+    3.2.4           3.2.3       2013        PSF         yes
     3.3.0           3.2         2012        PSF         yes
+    3.3.1           3.3.0       2013        PSF         yes

 Footnotes:

@@ -110,8 +112,8 @@
 distribute, and otherwise use Python alone or in any derivative
version,
 provided, however, that PSF's License Agreement and PSF's notice of
copyright,
 i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010,
-2011, 2012 Python Software Foundation; All Rights Reserved" are
retained in Python
-alone or in any derivative version prepared by Licensee.
+2011, 2012, 2013 Python Software Foundation; All Rights Reserved" are
retained
+in Python alone or in any derivative version prepared by Licensee.

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_2.7.3.bb: Inherit python-dir

So it can get the correct python direcotries for python2

Signed-off-by: Khem Raj <raj.khem@gmail.com>
python-distribute: Add recipes for python2 and python3

in python3-distribute rename easy_install to easy3_install

Signed-off-by: Khem Raj <raj.khem@gmail.com>
distutils3.bbclass: Fix typo and use proper values for target sysroot

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>
distutils3.bbclass: Use MACHINE for sysroot when not building for build host

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>
package.bbclass: move reading shlibs providers to separate function

* prepare for reading shlibs providers only from dependency tree of
  current recipe

[YOCTO #4628]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: show warning when package is trying to provide already provided shlib

* move read_shlib_providers before registering package as provider
  and don't change provider if it already exists, show warning instead

[YOCTO #4628]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: add SHLIBSSEARCHDIRS to define where to search for shlib providers

* when package contains some files matching "^.*\.so", but in directory
  not default linker search paths (e.g. /opt/package/bundled-lib/libfoo.so)
  don't register it as libfoo provider, because it's possible that there
  is different package providing libfoo.so in ${libdir} and that would
  be better shlib provider for other packages to depend on
* recipes providing libs intentionally in some other directory can
  define own SHLIBSSEARCHDIRS value

[YOCTO #4628]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: Don't search for prividers of PRIVATE_LIBS

* split PRIVATE_LIBS and don't use find(), so that libfoo cannot be
  found in PRIVATE_LIBS = "libfoobar"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: Show which files require given dependency in debug output

* when log.do_package shows some unexpected dependency, people usually
  need to grep package directory to find which binary was creating that
  dependency, show it directly in the debug output

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qemux86: Add identical qemux86copy variant for tests

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
allarch: Always inhibit default dependencies and set empty TARGET_PREFIX

* typical case where we inherit allarch and override PACKAGE_ARCH
  are packagegroup recipes, but those need default dependencies
  inhibited even when they are MACHINE_ARCH or TUNE_PKGARCH.
  I don't know about any recipe which inherits allarch and needs
  default dependencies.
* set empty TARGET_PREFIX
  This has a bit weird reason caused by unsupported setup where
  external-toolchain is used in some DISTRO only for some MACHINEs
  and internal is used for other MACHINEs.
  Because external-toolchain usually comes with different TARGET_PREFIX
  it was causing allarch recipes to have different signatures even
  when they don't use toolchain at all.
  Empty TARGET_PREFIX also helps to find allarch recipes which still
  have default dependency on e.g. virtual/${TARGET_PREFIX}gcc.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>