From patchwork Wed Nov 27 14:00:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 180304 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6157955ilf; Wed, 27 Nov 2019 06:01:21 -0800 (PST) X-Google-Smtp-Source: APXvYqx+hVfeJsnMDSF46ONkwgRkTQQWb2Cih3GBUtRECnr7/Nxh8B9Bt7WPRYO4UIj8/qI2/v7Y X-Received: by 2002:a17:90a:1089:: with SMTP id c9mr6356694pja.8.1574863281122; Wed, 27 Nov 2019 06:01:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574863281; cv=none; d=google.com; s=arc-20160816; b=BfyyJ60xzXej5Qi5UydyK31/AlpaGEyqcf7h2RU7nwZvHkGgCu+nZSbCz9UWkXhTWm O62naTrhn5tT9OVO9N+hE/miRCjny2+pb7s4EYFmT5O/JXgTz1W5YVMjJ+RfRs5kxnm2 APjooZ01M23kbgUXJ+cH5CaU8blwMyDiCpE7TxYHRmFGwZE5DOLwfx3XS/zc52puTUcE 2xJvbwelInYSncRT+UsQYTGM/fWAWjz1hO2E5kCrXYcjBzY0ug/LgkrSFH3OgddRdYUi fADfA3IAS6DCROxraDIwtjVcPNdr+nac6fTkYo1BtYTQDecRHTggcd0x0JfkKmtG8wJB 9JUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=HLIg/TnEblBfIhN/JVSvoY7OtaSZozUdojAQE88pnPM=; b=b7L6v7evbx1b8yPzVSRBeea1wvcSXnPSzxb9ZkqRBTlwdviInvT5SC7IcYEbAefad1 jGVQ3RcteCLoublovO4MtbZ2Z22sam20MLWf93mU8edkvaaB9Y21+Y4uIgVqbQap+6Zy FDdffXJPAcKID0e8HHhpxNjoOe9D3FPBhVYTTlz/Ko1sQr9KxKrPFCzPsFwG8eqTulzl os67Zglhc9GGusYTiyAtM/yMGD8Y1+5hMGN+pkjvMaYjApJDm51Zi6RrQWSriuFRT0Pn bmcJKjlVo6qeiZo8Crp5vy5JnYBJSQ62u6SHjBqMCMNcwDEWvWT6DM1aITibEHyIOpSG 9Tuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=hkkDScN0; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id b20si14252974pgl.118.2019.11.27.06.01.20; Wed, 27 Nov 2019 06:01:21 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=hkkDScN0; 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=NONE dis=NONE) header.from=intel.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 E82847FC5D; Wed, 27 Nov 2019 14:00:52 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mail.openembedded.org (Postfix) with ESMTP id DAAAF7FC33 for ; Wed, 27 Nov 2019 14:00:40 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id z3so26792011wru.3 for ; Wed, 27 Nov 2019 06:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=KGGzqCS/VKikJ16p1Wa12d9ZWIUeUVYWghVbO5fR1ck=; b=hkkDScN0VHqaqmov63kF9vWleU5ZS7wCE/jLys22deO7aLyGKD7/LNN/kWLPnzjXNf WQSrEIpR73aAjVhLlBrGb1fwKp/Aqo5+0TUH85lYY2z/evFhwB1SEVI7EgK1BTTDzrsm +/CpzTb23VbSNeeWU9VxIndio2DoDpuA3t9dw9+zfDaRXydD8fo+N4vslh3niqHCWbWp kTSahx5l6n3DSWLnyULfxSmK6nH6GseeGk2VXczZ8TZPAHKqvrfw470oiEWWAwoeiC0c Cszumw9jt2ve5lasEFjgExbfjPqzdR/1/i1sHrcvgyHI4mXCU0ypBzRJcyBh5DcSLtbk ve8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KGGzqCS/VKikJ16p1Wa12d9ZWIUeUVYWghVbO5fR1ck=; b=awSw1X4p2Ok9aYNdIaUhmenbP14Wn9bTDmp7XNCaR3dP2Xl8E1n5QYnxzKZoQzHVJ1 nr9+8b7ZiS8qibZPEyocW6LyizUh7sBmDVE3XWNy2l6++rsinOJMYFN7pUKu8FYy7jOe UKEX24lPK6rHvl+mqaBzcfYZVmQIKVqAnJi/Av/+/bvzKwj1JpEGbk5V25pQfeV4gF6v zVqNaUJq2aBGiqX6qiXGS8FqvcdMkBE8FPg8O7Z4kSTsU0f+xm0nVRCQ+/1qyzzwkrdH 89CCcm8+L9g4S5BPIldhUlg6uOVmtJEquRKc1WvPLaqTOEa8B3tZR+nFCzMbdIKzGPUx YNAw== X-Gm-Message-State: APjAAAXZnE6vzcYeWSu9GdrhECXVVAYgk5XPofC/kkvOmPzfzU0TADI3 vbr7/7gO4H8gYJxjDqFcdV4Snr32dDA= X-Received: by 2002:a05:6000:104:: with SMTP id o4mr12264757wrx.309.1574863241228; Wed, 27 Nov 2019 06:00:41 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id o1sm19372284wrs.50.2019.11.27.06.00.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 06:00:40 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Wed, 27 Nov 2019 14:00:30 +0000 Message-Id: <20191127140030.7838-6-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191127140030.7838-1-ross.burton@intel.com> References: <20191127140030.7838-1-ross.burton@intel.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 6/6] python: use PYTHON_FOR_BUILD, don't add HOSTPYTHON 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: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org 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. Signed-off-by: Ross Burton --- .../01-use-proper-tools-for-cross-build.patch | 34 ------------------- .../fix_for_using_different_libdir.patch | 14 ++++---- meta/recipes-devtools/python/python_2.7.17.bb | 3 +- 3 files changed, 8 insertions(+), 43 deletions(-) -- 2.20.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 56992210a23..b02c09458f1 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 # 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 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 b4e72193ff8..d41b6cfc744 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 =================================================================== --- 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.. diff --git a/meta/recipes-devtools/python/python_2.7.17.bb b/meta/recipes-devtools/python/python_2.7.17.bb index b3bdcba1a89..be7c6d2d2bf 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 @@ 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} \