diff options
author | Nitin A Kamble <nitin.a.kamble@intel.com> | 2012-03-14 11:06:09 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-19 14:37:39 +0000 |
commit | acc1b66677a7326321ce076a4b0cf820b600b088 (patch) | |
tree | e6612a5850c898405afc35c4eb304f0a90f422bc /meta | |
parent | f93c98ecd6f8049c03a3c4ed3e2879cb9a38ed1e (diff) | |
download | poky-acc1b66677a7326321ce076a4b0cf820b600b088.tar.gz |
python: fix install when libdir is not "lib"
This commit fixes python's install issue of not finding the
native pythong binray modules.
(From OE-Core rev: bf52e32e09423056c8c78760db22ca7497ec357d)
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch | 78 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python_2.7.2.bb | 2 |
2 files changed, 80 insertions, 0 deletions
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 0000000000..e8f19a24d8 --- /dev/null +++ b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | Upstream-Status: Inappropriate [Embedded specific] | ||
2 | |||
3 | This patch fixes issuing with different libdir like lib64. | ||
4 | This patch makes the native python binary modules findable | ||
5 | in the install process of the host python. | ||
6 | |||
7 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
8 | Date: 2012/03/14 | ||
9 | |||
10 | Index: Python-2.7.2/Lib/sysconfig.py | ||
11 | =================================================================== | ||
12 | --- Python-2.7.2.orig/Lib/sysconfig.py | ||
13 | +++ Python-2.7.2/Lib/sysconfig.py | ||
14 | @@ -7,10 +7,10 @@ from os.path import pardir, realpath | ||
15 | |||
16 | _INSTALL_SCHEMES = { | ||
17 | 'posix_prefix': { | ||
18 | - 'stdlib': '{base}/lib/python{py_version_short}', | ||
19 | - 'platstdlib': '{platbase}/lib/python{py_version_short}', | ||
20 | - 'purelib': '{base}/lib/python{py_version_short}/site-packages', | ||
21 | - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', | ||
22 | + 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', | ||
23 | + 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', | ||
24 | + 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
25 | + 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
26 | 'include': '{base}/include/python{py_version_short}', | ||
27 | 'platinclude': '{platbase}/include/python{py_version_short}', | ||
28 | 'scripts': '{base}/bin', | ||
29 | @@ -65,10 +65,10 @@ _INSTALL_SCHEMES = { | ||
30 | 'data' : '{userbase}', | ||
31 | }, | ||
32 | 'posix_user': { | ||
33 | - 'stdlib': '{userbase}/lib/python{py_version_short}', | ||
34 | - 'platstdlib': '{userbase}/lib/python{py_version_short}', | ||
35 | - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
36 | - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
37 | + 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
38 | + 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
39 | + 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
40 | + 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
41 | 'include': '{userbase}/include/python{py_version_short}', | ||
42 | 'scripts': '{userbase}/bin', | ||
43 | 'data' : '{userbase}', | ||
44 | Index: Python-2.7.2/Makefile.pre.in | ||
45 | =================================================================== | ||
46 | --- Python-2.7.2.orig/Makefile.pre.in | ||
47 | +++ Python-2.7.2/Makefile.pre.in | ||
48 | @@ -928,25 +928,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL | ||
49 | done; \ | ||
50 | done | ||
51 | $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt | ||
52 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
53 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | ||
54 | $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
55 | -d $(LIBDEST) -f \ | ||
56 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | ||
57 | $(DESTDIR)$(LIBDEST) | ||
58 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
59 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | ||
60 | $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
61 | -d $(LIBDEST) -f \ | ||
62 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | ||
63 | $(DESTDIR)$(LIBDEST) | ||
64 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
65 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | ||
66 | $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
67 | -d $(LIBDEST)/site-packages -f \ | ||
68 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | ||
69 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
70 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | ||
71 | $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
72 | -d $(LIBDEST)/site-packages -f \ | ||
73 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | ||
74 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
75 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | ||
76 | $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" | ||
77 | |||
78 | # 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 d2100be4ac..cb0a1d5a4e 100644 --- a/meta/recipes-devtools/python/python_2.7.2.bb +++ b/meta/recipes-devtools/python/python_2.7.2.bb | |||
@@ -21,6 +21,7 @@ SRC_URI += "\ | |||
21 | file://add-md5module-support.patch \ | 21 | file://add-md5module-support.patch \ |
22 | file://host_include_contamination.patch \ | 22 | file://host_include_contamination.patch \ |
23 | file://sys_platform_is_now_always_linux2.patch \ | 23 | file://sys_platform_is_now_always_linux2.patch \ |
24 | file://fix_for_using_different_libdir.patch \ | ||
24 | " | 25 | " |
25 | 26 | ||
26 | S = "${WORKDIR}/Python-${PV}" | 27 | S = "${WORKDIR}/Python-${PV}" |
@@ -99,6 +100,7 @@ do_install() { | |||
99 | 100 | ||
100 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | 101 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ |
101 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | 102 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ |
103 | CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ | ||
102 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | 104 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
103 | STAGING_INCDIR=${STAGING_INCDIR} \ | 105 | STAGING_INCDIR=${STAGING_INCDIR} \ |
104 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | 106 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ |