| Submitter | Nitin A Kamble |
|---|---|
| Date | March 15, 2012, 2:02 a.m. |
| Message ID | <1b743bf3864539a8ce1902a269a5cec7d50dba1b.1331776832.git.nitin.a.kamble@intel.com> |
| Download | mbox | patch |
| Permalink | /patch/23379/ |
| State | New |
| Headers | show |
Comments
Hello Nitin, On 15.03.2012 03:02, nitin.a.kamble@intel.com wrote: > --- a/meta/recipes-devtools/python/python_2.7.2.bb > +++ b/meta/recipes-devtools/python/python_2.7.2.bb > @@ -20,7 +20,7 @@ SRC_URI += "\ > file://setup_py_skip_cross_import_check.patch \ > file://add-md5module-support.patch \ > file://host_include_contamination.patch \ > - file://sys_platform_is_now_always_linux2.patch \ did you remove this one by accident? Regards, Andreas
On Wed, Mar 14, 2012 at 07:02:14PM -0700, nitin.a.kamble@intel.com wrote: > From: Nitin A Kamble <nitin.a.kamble@intel.com> > > This commit fixes python's install issue of not finding the > native pythong binray modules. > > Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> > --- > .../python/fix_for_using_different_libdir.patch | 78 ++++++++++++++++++++ > meta/recipes-devtools/python/python_2.7.2.bb | 3 +- > 2 files changed, 80 insertions(+), 1 deletions(-) > create mode 100644 meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch > > diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb > index d2100be..412b294 100644 > --- a/meta/recipes-devtools/python/python_2.7.2.bb > +++ b/meta/recipes-devtools/python/python_2.7.2.bb > @@ -20,7 +20,7 @@ SRC_URI += "\ > file://setup_py_skip_cross_import_check.patch \ > file://add-md5module-support.patch \ > file://host_include_contamination.patch \ > - file://sys_platform_is_now_always_linux2.patch \ > + file://fix_for_using_different_libdir.patch \ ^ really? > " > > S = "${WORKDIR}/Python-${PV}" > @@ -99,6 +99,7 @@ do_install() { > > oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ > HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ > + CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ > STAGING_LIBDIR=${STAGING_LIBDIR} \ > STAGING_INCDIR=${STAGING_INCDIR} \ > BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
> -----Original Message----- > From: openembedded-core-bounces@lists.openembedded.org > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of > Andreas Oberritter > Sent: Wednesday, March 14, 2012 8:00 PM > To: openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH 5/8] python: fix install when libdir is > not "lib" > > Hello Nitin, > > On 15.03.2012 03:02, nitin.a.kamble@intel.com wrote: > > --- a/meta/recipes-devtools/python/python_2.7.2.bb > > +++ b/meta/recipes-devtools/python/python_2.7.2.bb > > @@ -20,7 +20,7 @@ SRC_URI += "\ > > file://setup_py_skip_cross_import_check.patch \ > > file://add-md5module-support.patch \ > > file://host_include_contamination.patch \ > > - file://sys_platform_is_now_always_linux2.patch \ > > did you remove this one by accident? > > Regards, > Andreas > Andreas, Yes, it was an accident. I will correct it. Thanks for catching. Nitin
> -----Original Message----- > From: openembedded-core-bounces@lists.openembedded.org > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of > Martin Jansa > Sent: Thursday, March 15, 2012 12:19 AM > To: Patches and discussions about the oe-core layer > Subject: Re: [OE-core] [PATCH 5/8] python: fix install when libdir is > not "lib" > > On Wed, Mar 14, 2012 at 07:02:14PM -0700, nitin.a.kamble@intel.com > wrote: > > From: Nitin A Kamble <nitin.a.kamble@intel.com> > > > > This commit fixes python's install issue of not finding the native > > pythong binray modules. > > > > Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> > > --- > > .../python/fix_for_using_different_libdir.patch | 78 > ++++++++++++++++++++ > > meta/recipes-devtools/python/python_2.7.2.bb | 3 +- > > 2 files changed, 80 insertions(+), 1 deletions(-) create mode > 100644 > > meta/recipes- > devtools/python/python/fix_for_using_different_libdir.pat > > ch > > > > diff --git a/meta/recipes-devtools/python/python_2.7.2.bb > > b/meta/recipes-devtools/python/python_2.7.2.bb > > index d2100be..412b294 100644 > > --- a/meta/recipes-devtools/python/python_2.7.2.bb > > +++ b/meta/recipes-devtools/python/python_2.7.2.bb > > @@ -20,7 +20,7 @@ SRC_URI += "\ > > file://setup_py_skip_cross_import_check.patch \ > > file://add-md5module-support.patch \ > > file://host_include_contamination.patch \ > > - file://sys_platform_is_now_always_linux2.patch \ > > + file://fix_for_using_different_libdir.patch \ > > ^ really? Martin, Removing a patch was an accident. It is getting fixed now. Thanks for catching it. Nitin > > > " > > > > S = "${WORKDIR}/Python-${PV}" > > @@ -99,6 +99,7 @@ do_install() { > > > > oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ > > HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ > > + > > +CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib- > d > > +ynload/ \ > > STAGING_LIBDIR=${STAGING_LIBDIR} \ > > STAGING_INCDIR=${STAGING_INCDIR} \ > > BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ > > -- > Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
Patch
diff --git a/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch new file mode 100644 index 0000000..e8f19a2 --- /dev/null +++ b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch @@ -0,0 +1,78 @@ +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 + +Index: Python-2.7.2/Lib/sysconfig.py +=================================================================== +--- Python-2.7.2.orig/Lib/sysconfig.py ++++ Python-2.7.2/Lib/sysconfig.py +@@ -7,10 +7,10 @@ from os.path import pardir, realpath + + _INSTALL_SCHEMES = { + 'posix_prefix': { +- 'stdlib': '{base}/lib/python{py_version_short}', +- 'platstdlib': '{platbase}/lib/python{py_version_short}', +- 'purelib': '{base}/lib/python{py_version_short}/site-packages', +- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', ++ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', ++ 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages', ++ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', + 'include': '{base}/include/python{py_version_short}', + 'platinclude': '{platbase}/include/python{py_version_short}', + 'scripts': '{base}/bin', +@@ -65,10 +65,10 @@ _INSTALL_SCHEMES = { + 'data' : '{userbase}', + }, + 'posix_user': { +- 'stdlib': '{userbase}/lib/python{py_version_short}', +- 'platstdlib': '{userbase}/lib/python{py_version_short}', +- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', +- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', ++ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', ++ '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', + 'data' : '{userbase}', +Index: Python-2.7.2/Makefile.pre.in +=================================================================== +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -928,25 +928,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL + done; \ + done + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt +- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) +- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" + + # Create the PLATDIR source directory, if one wasn't distributed.. diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb index d2100be..412b294 100644 --- a/meta/recipes-devtools/python/python_2.7.2.bb +++ b/meta/recipes-devtools/python/python_2.7.2.bb @@ -20,7 +20,7 @@ SRC_URI += "\ file://setup_py_skip_cross_import_check.patch \ file://add-md5module-support.patch \ file://host_include_contamination.patch \ - file://sys_platform_is_now_always_linux2.patch \ + file://fix_for_using_different_libdir.patch \ " S = "${WORKDIR}/Python-${PV}" @@ -99,6 +99,7 @@ do_install() { oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ + CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ STAGING_LIBDIR=${STAGING_LIBDIR} \ STAGING_INCDIR=${STAGING_INCDIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \