diff options
author | Ross Burton <ross.burton@intel.com> | 2019-11-26 11:19:49 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-29 17:43:40 +0000 |
commit | dfd6cd9eb6357fdcb290b0ffd785b1a7cd3a1c6a (patch) | |
tree | 99167a4b1007d867c087123f5ec26950a196ebdb /meta/recipes-devtools/python | |
parent | d4091bc1bdb614dcf56078883b39db73204f459c (diff) | |
download | poky-dfd6cd9eb6357fdcb290b0ffd785b1a7cd3a1c6a.tar.gz |
python: use PYTHON_FOR_BUILD, don't add HOSTPYTHON
There's already a variable for "the host python to use during the build
when cross-compiling", so there's no need to add another.
(From OE-Core rev: 1ede9777478469fbdb633782e0ffb2ae68b1a578)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
3 files changed, 8 insertions, 43 deletions
diff --git a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch index 56992210a2..b02c09458f 100644 --- a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch | |||
@@ -25,40 +25,6 @@ Index: Python-2.7.13/Makefile.pre.in | |||
25 | 25 | ||
26 | # Create build directory and generate the sysconfig build-time data there. | 26 | # Create build directory and generate the sysconfig build-time data there. |
27 | # pybuilddir.txt contains the name of the build dir and is used for | 27 | # pybuilddir.txt contains the name of the build dir and is used for |
28 | @@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL | ||
29 | $(DESTDIR)$(LIBDEST)/distutils/tests ; \ | ||
30 | fi | ||
31 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
32 | - $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
33 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
34 | -d $(LIBDEST) -f \ | ||
35 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | ||
36 | $(DESTDIR)$(LIBDEST) | ||
37 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
38 | - $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
39 | + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
40 | -d $(LIBDEST) -f \ | ||
41 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | ||
42 | $(DESTDIR)$(LIBDEST) | ||
43 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
44 | - $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
45 | + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
46 | -d $(LIBDEST)/site-packages -f \ | ||
47 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | ||
48 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
49 | - $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
50 | + $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
51 | -d $(LIBDEST)/site-packages -f \ | ||
52 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | ||
53 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
54 | - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt | ||
55 | + $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt | ||
56 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
57 | - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt | ||
58 | + $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt | ||
59 | |||
60 | # Create the PLATDIR source directory, if one wasn't distributed.. | ||
61 | $(srcdir)/Lib/$(PLATDIR): | ||
62 | Index: Python-2.7.13/setup.py | 28 | Index: Python-2.7.13/setup.py |
63 | =================================================================== | 29 | =================================================================== |
64 | --- Python-2.7.13.orig/setup.py | 30 | --- Python-2.7.13.orig/setup.py |
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 index b4e72193ff..d41b6cfc74 100644 --- a/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch +++ b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch | |||
@@ -41,37 +41,37 @@ Index: Python-2.7.9/Makefile.pre.in | |||
41 | =================================================================== | 41 | =================================================================== |
42 | --- Python-2.7.9.orig/Makefile.pre.in | 42 | --- Python-2.7.9.orig/Makefile.pre.in |
43 | +++ Python-2.7.9/Makefile.pre.in | 43 | +++ Python-2.7.9/Makefile.pre.in |
44 | @@ -1046,27 +1046,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL | 44 | @@ -1037,27 +1037,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL |
45 | $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ | 45 | $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ |
46 | $(DESTDIR)$(LIBDEST)/distutils/tests ; \ | 46 | $(DESTDIR)$(LIBDEST)/distutils/tests ; \ |
47 | fi | 47 | fi |
48 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 48 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
49 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 49 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
50 | $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | 50 | $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
51 | -d $(LIBDEST) -f \ | 51 | -d $(LIBDEST) -f \ |
52 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | 52 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
53 | $(DESTDIR)$(LIBDEST) | 53 | $(DESTDIR)$(LIBDEST) |
54 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 54 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
55 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 55 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
56 | $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 56 | $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
57 | -d $(LIBDEST) -f \ | 57 | -d $(LIBDEST) -f \ |
58 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | 58 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
59 | $(DESTDIR)$(LIBDEST) | 59 | $(DESTDIR)$(LIBDEST) |
60 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 60 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
61 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 61 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
62 | $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | 62 | $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ |
63 | -d $(LIBDEST)/site-packages -f \ | 63 | -d $(LIBDEST)/site-packages -f \ |
64 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | 64 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
65 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 65 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
66 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 66 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
67 | $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 67 | $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
68 | -d $(LIBDEST)/site-packages -f \ | 68 | -d $(LIBDEST)/site-packages -f \ |
69 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | 69 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
70 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 70 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
71 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 71 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
72 | $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt | 72 | $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt |
73 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 73 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
74 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 74 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
75 | $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt | 75 | $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt |
76 | 76 | ||
77 | # Create the PLATDIR source directory, if one wasn't distributed.. | 77 | # Create the PLATDIR source directory, if one wasn't distributed.. |
diff --git a/meta/recipes-devtools/python/python_2.7.17.bb b/meta/recipes-devtools/python/python_2.7.17.bb index b3bdcba1a8..be7c6d2d2b 100644 --- a/meta/recipes-devtools/python/python_2.7.17.bb +++ b/meta/recipes-devtools/python/python_2.7.17.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | require python.inc | 1 | require python.inc |
2 | 2 | ||
3 | DEPENDS = "python-native libffi bzip2 gdbm openssl \ | 3 | DEPENDS = "libffi bzip2 gdbm openssl \ |
4 | readline sqlite3 zlib virtual/crypt" | 4 | readline sqlite3 zlib virtual/crypt" |
5 | 5 | ||
6 | DISTRO_SRC_URI ?= "file://sitecustomize.py" | 6 | DISTRO_SRC_URI ?= "file://sitecustomize.py" |
@@ -48,7 +48,6 @@ PACKAGECONFIG[tk] = ",,tk" | |||
48 | 48 | ||
49 | # pgen isn't needed in the current build, but use the binary from python-native just in case. | 49 | # pgen isn't needed in the current build, but use the binary from python-native just in case. |
50 | EXTRA_OEMAKE = "PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ | 50 | EXTRA_OEMAKE = "PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ |
51 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ | ||
52 | CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ | 51 | CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ |
53 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | 52 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
54 | STAGING_INCDIR=${STAGING_INCDIR} \ | 53 | STAGING_INCDIR=${STAGING_INCDIR} \ |