mirror of
https://git.yoctoproject.org/poky
synced 2026-02-06 08:48:45 +01:00
Rebased: - python/01-use-proper-tools-for-cross-build.patch - python/fix-makefile-for-ptest.patch - python/parallel-makeinst-create-bindir.patch Removed Upstreamed Patch: - python/Don-t-use-getentropy-on-Linux.patch Updated license checksum for changes in the copyright date. The license terms remain unchanged Added an extra do_compile item to create the native pgen that no longer gets compiled by default (From OE-Core rev: 9f2de4f9cf1eb6de75dc789bd0549f45c7a68c55) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
101 lines
4.4 KiB
Diff
101 lines
4.4 KiB
Diff
We need to ensure our host tools get run during build, not the freshly
|
|
built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
|
|
|
|
Upstream-Status: Inappropriate [embedded specific]
|
|
|
|
Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
|
|
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
|
|
Rebased for python-2.7.9
|
|
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
|
|
|
|
Rebased for python-2.7.14
|
|
Signed-off-by: Derek Straka <derek@asterius.io>
|
|
|
|
Index: Python-2.7.13/Makefile.pre.in
|
|
===================================================================
|
|
--- Python-2.7.13.orig/Makefile.pre.in
|
|
+++ Python-2.7.13/Makefile.pre.in
|
|
@@ -245,6 +245,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
|
|
##########################################################################
|
|
# Parser
|
|
PGEN= Parser/pgen$(EXE)
|
|
+HOSTPGEN= $(PGEN)$(EXE)
|
|
|
|
PSRCS= \
|
|
Parser/acceler.c \
|
|
@@ -512,7 +513,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
|
|
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
|
|
|
platform: $(BUILDPYTHON) pybuilddir.txt
|
|
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
|
|
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
|
|
|
|
# Create build directory and generate the sysconfig build-time data there.
|
|
# pybuilddir.txt contains the name of the build dir and is used for
|
|
@@ -663,7 +663,7 @@
|
|
# Regenerate Include/graminit.h and Python/graminit.c
|
|
# from Grammar/Grammar using pgen
|
|
@$(MKDIR_P) Include
|
|
- $(PGEN) $(srcdir)/Grammar/Grammar \
|
|
+ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \
|
|
$(srcdir)/Include/graminit.h \
|
|
$(srcdir)/Python/graminit.c
|
|
|
|
@@ -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 $(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 -tt $(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 -tt $(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
|
|
+++ Python-2.7.13/setup.py
|
|
@@ -350,6 +350,7 @@ class PyBuildExt(build_ext):
|
|
self.failed.append(ext.name)
|
|
self.announce('*** WARNING: renaming "%s" since importing it'
|
|
' failed: %s' % (ext.name, why), level=3)
|
|
+ return
|
|
assert not self.inplace
|
|
basename, tail = os.path.splitext(ext_filename)
|
|
newname = basename + "_failed" + tail
|
|
@@ -574,6 +575,9 @@ class PyBuildExt(build_ext):
|
|
|
|
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
|
|
|
|
+ lib_dirs = [ os.getenv("STAGING_LIBDIR"), os.getenv("STAGING_BASELIBDIR") ]
|
|
+ inc_dirs = [ os.getenv("STAGING_INCDIR") ]
|
|
+
|
|
#
|
|
# The following modules are all pretty straightforward, and compile
|
|
# on pretty much any POSIXish platform.
|