mirror of
https://git.yoctoproject.org/poky
synced 2026-02-09 02:03:04 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
d4091bc1bd
commit
dfd6cd9eb6
@@ -25,40 +25,6 @@ Index: Python-2.7.13/Makefile.pre.in
|
||||
|
||||
# Create build directory and generate the sysconfig build-time data there.
|
||||
# pybuilddir.txt contains the name of the build dir and is used for
|
||||
@@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
|
||||
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
|
||||
fi
|
||||
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
+ $(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) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
+ $(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) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
-d $(LIBDEST)/site-packages -f \
|
||||
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
+ $(HOSTPYTHON) -Wi -t -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
|
||||
+ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
|
||||
+ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
|
||||
|
||||
# Create the PLATDIR source directory, if one wasn't distributed..
|
||||
$(srcdir)/Lib/$(PLATDIR):
|
||||
Index: Python-2.7.13/setup.py
|
||||
===================================================================
|
||||
--- Python-2.7.13.orig/setup.py
|
||||
|
||||
@@ -41,37 +41,37 @@ Index: Python-2.7.9/Makefile.pre.in
|
||||
===================================================================
|
||||
--- Python-2.7.9.orig/Makefile.pre.in
|
||||
+++ Python-2.7.9/Makefile.pre.in
|
||||
@@ -1046,27 +1046,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
|
||||
@@ -1037,27 +1037,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
|
||||
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
|
||||
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
|
||||
fi
|
||||
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
+ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
|
||||
$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
$(PYTHON_FOR_BUILD) -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 \
|
||||
$(PYTHON_FOR_BUILD) -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 -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
$(PYTHON_FOR_BUILD) -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 -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
$(PYTHON_FOR_BUILD) -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) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
|
||||
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
|
||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
|
||||
$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
|
||||
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
|
||||
|
||||
# Create the PLATDIR source directory, if one wasn't distributed..
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require python.inc
|
||||
|
||||
DEPENDS = "python-native libffi bzip2 gdbm openssl \
|
||||
DEPENDS = "libffi bzip2 gdbm openssl \
|
||||
readline sqlite3 zlib virtual/crypt"
|
||||
|
||||
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
||||
@@ -48,7 +48,6 @@ PACKAGECONFIG[tk] = ",,tk"
|
||||
|
||||
# pgen isn't needed in the current build, but use the binary from python-native just in case.
|
||||
EXTRA_OEMAKE = "PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
|
||||
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
|
||||
CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
|
||||
STAGING_LIBDIR=${STAGING_LIBDIR} \
|
||||
STAGING_INCDIR=${STAGING_INCDIR} \
|
||||
|
||||
Reference in New Issue
Block a user