From patchwork Wed Mar 5 22:04:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 327197 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id B1C7D2C022C for ; Thu, 6 Mar 2014 09:05:22 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BCD2A3341A; Wed, 5 Mar 2014 22:05:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lgJve5jobrLp; Wed, 5 Mar 2014 22:05:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 913E933330; Wed, 5 Mar 2014 22:05:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 3A7C31C0EC7 for ; Wed, 5 Mar 2014 22:05:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 38D8B8BD62 for ; Wed, 5 Mar 2014 22:05:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yK9pGk1wyskh for ; Wed, 5 Mar 2014 22:05:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by fraxinus.osuosl.org (Postfix) with ESMTPS id EA73D8BD51 for ; Wed, 5 Mar 2014 22:05:07 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id b13so2090138wgh.20 for ; Wed, 05 Mar 2014 14:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=c5ieV+m//LqHboDK+/JD+CIGOjPrsECezAzpf8OFV6M=; b=n1t6kHYJc7EmD2SMXVUy+rOw4ez99vsGPudknjBPXO5v3VAY1FJ5kwPqbqJpAMXMEt fA23lZRQht1DC4P9PaBmlSa8slDhWHuf2LjvR+M+3q1vAetF27UklxgiwjoiO0Wyl+Ks w85H1d6VK0I4gBd028tRfbkTxfL5S/56HV3BzPWF3dZ2EydBzvTVc9/k8tLFPtQySvmg R8GxIUNTevKD4lZy3/0w/2m/6LX0Vr9n0Z98PgjsDf461IbZS9ILRei3ok1QmclNQwlX LG9TLR5oFIFJv2c8uxwtFAcZ6VMhStayUpXNCr/cNgKsP8JeuMiCUqP+bhmjvYyDBPCM vsFg== X-Received: by 10.194.178.8 with SMTP id cu8mr2871wjc.77.1394057106531; Wed, 05 Mar 2014 14:05:06 -0800 (PST) Received: from localhost.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPSA id z1sm6555457wjq.19.2014.03.05.14.05.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Mar 2014 14:05:05 -0800 (PST) From: Samuel Martin To: buildroot@buildroot.net Date: Wed, 5 Mar 2014 23:04:41 +0100 Message-Id: <1394057085-10399-3-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1394057085-10399-1-git-send-email-s.martin49@gmail.com> References: <1394057085-10399-1-git-send-email-s.martin49@gmail.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH 2/6] python3: rework python symlinks installation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This patch reworks the way python3 and python3-config symlink are installed. Buildroot wants to control these symlinks' installation: * the python3 symlink should be unconditionally installed in the target tree, and the python3-config symlink in the staging tree, since it is the only python package built and installed in the target tree if the user selected it; * the python3 and python3-config symlinks should only be installed in the host tree when python3 is the selection of the user for the target. Signed-off-by: Samuel Martin Cc: Gustavo Zacarias Cc: Thomas Petazzoni --- package/python3/python3.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 3d95a6d..19bef1e 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -156,11 +156,20 @@ ifneq ($(BR2_PACKAGE_PYTHON),y) PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK endif +# +# Some packages may have build scripts requiring python3, whatever is the +# python version chosen for the target. +# Only install the python symlink in the host tree if python3 is enabled +# for the target. +# +ifeq ($(BR2_PACKAGE_PYTHON3),y) define HOST_PYTHON3_INSTALL_SYMLINK ln -fs python3 $(HOST_DIR)/usr/bin/python + ln -fs python3-config $(HOST_DIR)/usr/bin/python-config endef HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK +endif # Provided to other packages PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/