From patchwork Mon Nov 25 17:22:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 180169 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3450758ilf; Mon, 25 Nov 2019 09:22:54 -0800 (PST) X-Google-Smtp-Source: APXvYqy1Rc4q8TywCD66jNGwQhCIV0SStxXvPuxLx0z8fZ0rEuj5ZEXN6Qqe+iCaqnVBgigZH7rH X-Received: by 2002:a62:174d:: with SMTP id 74mr35257727pfx.145.1574702574863; Mon, 25 Nov 2019 09:22:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574702574; cv=none; d=google.com; s=arc-20160816; b=h7tUkk8LFIJ9i72jem+ieaqxvg9E/9Bf/lDWSVH8F95O/PNJOmt4a5DxrpSzSOnw+8 mtPbrm26dNa88BE+/YEMkf6wCyevaTo37IKNqq/nA8FrhXhwWKfW7psKt22IoJk2oeJl bFlvNDUhFWqtGZ0uWA3u7f7CPS0Pt9EMK/y0Bb2LVqA1DANnK6IrPnzUjgXYLSf6LBH/ 4XEteRkNQTXyJu7UPU/Hc3iidaklvSK+xr+sQjg6UQqJlViVrh08V+cyCmm5qb3tT4Fq TrUx0GGY684P2PC8E/7JNXZlMmy9+agt0PA+goPGeaW7rzSh0bmDhP6UiLBVuaGng4xM Bhsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=AABMB2cWxKP6eLRhZoGzSIwKoXF1ykZCAm9mCxDPENc=; b=lIWfx1hqLtUWrVaiLM0hks7iIgwMd7hJ/r3D4vOXHVNVvdbWKEup0Z3Xg8RI5foFRE n1GsZptc1HlJZE9amwVEI2NUzT1b7tViojFXnZg4bTY6M5DjuiYRfPcIMRyPytj5TLQd 70uMFlsXr1rNQT3psIrHdimdDaREPOsNjUOatjF7gWDX3wwCDfCfiht/bIBxYXaV9x9i dEEryxxMG+wv+AFgsDg0bq7zOfD6LM030peuGNhFGXyG1WZsq6ZqYJMbXRspOGVt/BTn yVIOajLUITobdRTlwtc/Es0bn32svsh11zGcjvcmOnjbf8RBQhd8RLV8vBsr+UrLbzTy U3Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Opu7U41v; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 206si8197685pgb.416.2019.11.25.09.22.54; Mon, 25 Nov 2019 09:22:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Opu7U41v; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id C19157FBB3; Mon, 25 Nov 2019 17:22:51 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mail.openembedded.org (Postfix) with ESMTP id B66AE7FACA for ; Mon, 25 Nov 2019 17:22:29 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id t2so19133124wrr.1 for ; Mon, 25 Nov 2019 09:22:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+WBdAtMaTGMryk4osfL4HqBTCJ74uYiuLKpUXblHBbE=; b=Opu7U41vB0IqCBQS+AOqGXZn4lu2ykqifih1NpcKVqiD+IIEVlKfuDb38lgSeHR1G3 1/P9xhIMd4GToxj5pcfZ8WWmW38KGq9kusKQPmcx8Kjzx9xTi4U3b5wRPLwnv1BmT8vm qncVTTxW9fPjXwDg1JLyPFR57YpQS+tmZJwe9sluYgTEIQDax7mH/vXoA+Hdd7c8V9Wk HAkDsHNFl8DUsEals5sLuMpaHPxHDHErwIPVOqwAfnpAjmB90EyMMCBUnZ7pKWBlMKA2 RQ1SJ+ALvc73u2/XUPsXn+Z16U+Iy2f0uWpQaTMn9BEhAH4iiu1HY4bKy7bEkgxoVxxp EDiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+WBdAtMaTGMryk4osfL4HqBTCJ74uYiuLKpUXblHBbE=; b=lwfjQLio4G2K9kU2lw6stnyF+tqH93UQ93gzASRcwxdeJYZD6L5FcFD5Vu+zvtOLJY kfrnRnOWWcaUjdyaRkman83UFQYCfkeLyH84Nz2kjE8qNH5QcAufCDZ/JwD+Tid/yzXn hstrsrU8ThrDWFB4PcY8Fxk1WSo69QsvgJ6Cm7U5o85hlJsgDzqw+cm09Dl4fsp+R769 uT2/0BXy4Dj0OTvFvEzkJUt79pBEE0kImAPm/KrmxfwZc3j+GJUxhY/iXs3nGlSGaurj CTjsYRQYssFJ4NmhtUxz7cRNZ+I3YIPLP6PTxew2j1mqQn3tcannJRWIRC5A4+ssDOYw uFtg== X-Gm-Message-State: APjAAAWgZBv3NGkOH8+f7JYO2v4ufQwvyU5/RjL00Ij2E5zW5HJj1QO7 cz+NTPIjtt0VKOFoxxdSJT6yIqAt X-Received: by 2002:adf:d842:: with SMTP id k2mr32840625wrl.163.1574702550303; Mon, 25 Nov 2019 09:22:30 -0800 (PST) Received: from alexander-box.rd.corpintra.net ([141.113.66.202]) by smtp.gmail.com with ESMTPSA id f140sm9693357wme.21.2019.11.25.09.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 09:22:29 -0800 (PST) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Date: Mon, 25 Nov 2019 18:22:21 +0100 Message-Id: <20191125172224.82269-2-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191125172224.82269-1-alex.kanavin@gmail.com> References: <20191125172224.82269-1-alex.kanavin@gmail.com> Subject: [OE-core] [PATCH 2/5] python-native: don't cause a full regeneration of the built sources X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Ross Burton When cross-compiling Python 2 you need a native pgen binary, but the cross recipe can't do this on it's own so we build it in python-native and install it. The rule to build pgen was also causing a complete rebuild of all of the generated sources, which meant that building Python 2 needs a *host* Python 2. This can be fixed by simply building pgen, as this is all we need to install. [ YOCTO #13645 ] Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python-native_2.7.17.bb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.17.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/python/python-native_2.7.17.bb b/meta/recipes-devtools/python/python-native_2.7.17.bb index 936810d9806..98805d998d5 100644 --- a/meta/recipes-devtools/python/python-native_2.7.17.bb +++ b/meta/recipes-devtools/python/python-native_2.7.17.bb @@ -35,10 +35,9 @@ do_configure_append() { autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi } -# Regenerate all of the generated files -# This ensures that pgen and friends get created during the compile phase -do_compile_prepend() { - oe_runmake regen-all +# Cross-compiling Python needs a native pgen, build it here for use later. +do_compile_append() { + oe_runmake Parser/pgen } do_install() { From patchwork Mon Nov 25 17:22:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 180170 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3450883ilf; Mon, 25 Nov 2019 09:23:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzbvLPOUCfqvSwXEePQiVhUDl1UH22wOBSKb22UrB9gQmpPbiO7Qpfiv+tvbm2gyAGkkVqP X-Received: by 2002:a62:b60c:: with SMTP id j12mr14143427pff.8.1574702581163; Mon, 25 Nov 2019 09:23:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574702581; cv=none; d=google.com; s=arc-20160816; b=wgxvqZdAXl0CV9Kg3eo7YfIlcr9o0oWASVvn+yb5wlPiu93vfDBaR8mpESGRGcFEaz zyiMf/RmyA0i1SEkqPvYJMYNsIgIq7ggPI9u0Hd/lLb+N0Mh0n3Igu05cbPUWHjU5W/h PBoC1co249DlL25qd0bZnaoF403iIReJoUcuGAh+r269Afl/QVHhb1fffNJMQNNi72/R +xpojAtDOSNYZdOsatRbhrc8pAunaGxyOi91s0DlHyDwruQ3gXmzLN7yfOHf7zjE4MfO Y+E2rU/sZbWTbiSyWgJTVxsNe1euVdrs5lMTUiqQxNwfIyCqUQYM9Mi+2cRk/mkHLNBK ClFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=vW3EmlwLfyLRTAyGytqhdC+LzMZ8oYLuhK+iyIPWV/0=; b=IPCiHtSe8mxStyYzw/ETohU3ZPForDWKyS9Fg5UrRC69vUrQyT6NbEG8Z5WU1hzz82 lTGCSlXDE7BPcDfSJLcV83+w4l71Fr0PHWR3WFhQNxIJK0Az//xS9fMxWCyNzPExlmcs c/RhiOyWG2GSAfUcxxEpa/lC+oaXB3pGwIHHflKXYat4rebNrJYEV8Hd5hLd6OkCxXv2 LyQSvgLZtcUYHJrD1w6hl9o36eORQNpPk8iG19VdRmlAUuZFIPAgC2RlmbWmg5pPRggX RgYJxpDi5pMmxGlt7OzKTo2nzBFJTOSeWMfg0UETV5s97H4Idm3gAhwHKoxAXQnv+nYg 0Ryg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ILIwrNbG; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id g23si8600662pgm.405.2019.11.25.09.23.00; Mon, 25 Nov 2019 09:23:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ILIwrNbG; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id F3D987FC33; Mon, 25 Nov 2019 17:22:52 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mail.openembedded.org (Postfix) with ESMTP id C4CB47FB43 for ; Mon, 25 Nov 2019 17:22:30 +0000 (UTC) Received: by mail-wr1-f49.google.com with SMTP id z10so19044119wrs.12 for ; Mon, 25 Nov 2019 09:22:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FfuG2nIi5PAva8cZaktDmOooPKY+4Ff9yYXCKj0ZuR4=; b=ILIwrNbGUTtLkaX3+pAfHQpLJoMr5nlp+7Q8FZIE/JsdxyQRXw7X6rDMD4CDm7ZDaI Apagn4eelh/RPnIiLZikOdWnHtCcQi4c/loNNaQKn+QwG42H6BmNtlYHieP2uJI0GNoZ 88qbmR9tmSkh8RmG62HqHqbwByrxKkoKHuHSWr0aKsbHwOVfjky39sMrfSX91O6dMglk UP0D9reDxUOGKaFgu4qSsUdgPSSLMk7nONczBvGbYJ6u8NzsjAKn0RhC8E5zHXcB3u3S iM3W5NlLVXFXbqlu6XK3FlmuMB5dqt4i/yhDZH6SFE6jHJwc+sn1Gp2Dat+1Pvd2+ZMn jlpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FfuG2nIi5PAva8cZaktDmOooPKY+4Ff9yYXCKj0ZuR4=; b=ZGSDIGF+0+R03A+KzohCXaDnJaOXwmWfmOvFkxoOTd3cvUEel1a+n5B3VhVdQ4RN6k ag9DwxKYhzcBdLCLj/j6R0SVbDWKLxIazZeaT2QLfpfh7pBe70B5mZezzBbeswOE2G0O 3V/TVqSFmoTWxs9qmSo+0pKsStz3kekdO9065Pi5DAjolVCSKFu4cXx0UW7G7RpvKMml s5cORNvQmoHEQnuWWYuKU5YLyrH2aifqs8ZCAvCU4DAKihMVDkRGwk0tvTTHtnPU99cx eaPzWWXzK7fvUNNlARWjEwL8TunbC2BGuaLNTwddJT/jnVwZAsMbWHHvWURDf3JPuxGO qmvA== X-Gm-Message-State: APjAAAVJsJpAjMWEdwGD4iIj3iArZxhMjMtK9JIxki+XWmOxOy3ZmviJ dDy97iwvtA6uQEToc1qmwPSBT/Ux X-Received: by 2002:a5d:6746:: with SMTP id l6mr28273928wrw.349.1574702551009; Mon, 25 Nov 2019 09:22:31 -0800 (PST) Received: from alexander-box.rd.corpintra.net ([141.113.66.202]) by smtp.gmail.com with ESMTPSA id f140sm9693357wme.21.2019.11.25.09.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 09:22:30 -0800 (PST) From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Date: Mon, 25 Nov 2019 18:22:22 +0100 Message-Id: <20191125172224.82269-3-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191125172224.82269-1-alex.kanavin@gmail.com> References: <20191125172224.82269-1-alex.kanavin@gmail.com> Subject: [OE-core] [PATCH 3/5] python: clean up command overriding X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Ross Burton There's no need to add HOSTPGEN or HOSTPYTHON variables when we can just override the existing PGEN and PYTHON_FOR_BUILD variables. Signed-off-by: Ross Burton --- .../01-use-proper-tools-for-cross-build.patch | 65 +------------------ .../fix_for_using_different_libdir.patch | 38 ++++------- meta/recipes-devtools/python/python_2.7.17.bb | 9 +-- 3 files changed, 20 insertions(+), 92 deletions(-) -- 2.17.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core 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 e795a74b911..fa6c5ef1d7f 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 @@ -1,29 +1,13 @@ -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. +Unfortunately the explanation for these changes have been lost to the mists of +time. Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Michael 'Mickey' Lauer -Signed-off-by: Paul Eggleton - -Rebased for python-2.7.9 -Signed-off-by: Alejandro Hernandez - -Rebased for python-2.7.14 -Signed-off-by: Derek Straka +Signed-off-by: Ross Burton 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) @@ -33,49 +17,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 -@@ -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 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 5f7309367c4..eeb6833186e 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 @@ -1,19 +1,9 @@ -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 -Date: 2012/03/14 - -Updated for python 2.7.3 -Signed-off-by: Nitin A Kamble -Date: 2012/05/01 - -Rebased for python-2.7.9 -Signed-off-by: Alejandro Hernandez - +Upstream-Status: Inappropriate [Embedded specific] +Signed-off-by: Ross Burton Index: Python-2.7.9/Lib/sysconfig.py =================================================================== @@ -37,41 +27,41 @@ Index: Python-2.7.9/Lib/sysconfig.py 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', 'include': '{userbase}/include/python{py_version_short}', 'scripts': '{userbase}/bin', -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 +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 17e6f05..3db0a46 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1133,27 +1133,27 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c $(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 $(DESTDIR)$(LIBDEST)/compileall.py \ ++ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ + $(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 $(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.. diff --git a/meta/recipes-devtools/python/python_2.7.17.bb b/meta/recipes-devtools/python/python_2.7.17.bb index 5b856a50977..7e9aef556b8 100644 --- a/meta/recipes-devtools/python/python_2.7.17.bb +++ b/meta/recipes-devtools/python/python_2.7.17.bb @@ -82,8 +82,7 @@ do_compile() { export CROSS_COMPILE="${TARGET_PREFIX}" export PYTHONBUILDDIR="${B}" - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ + oe_runmake PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ STAGING_LIBDIR=${STAGING_LIBDIR} \ STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ @@ -100,16 +99,14 @@ do_install() { # After swizzling the makefile, we need to run the build again. # install can race with the build so we have to run this first, then install - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ + oe_runmake PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ STAGING_LIBDIR=${STAGING_LIBDIR} \ STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ DESTDIR=${D} LIBDIR=${libdir} - oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ - HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ + oe_runmake PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ STAGING_LIBDIR=${STAGING_LIBDIR} \ STAGING_INCDIR=${STAGING_INCDIR} \