From patchwork Sat Nov 24 23:21:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1002708 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="taI2wzX+"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 432Thz42B3z9sPD for ; Sun, 25 Nov 2018 10:21:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BCD9B87874; Sat, 24 Nov 2018 23:21:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b7lEFbPWkZ+m; Sat, 24 Nov 2018 23:21:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B120E877D0; Sat, 24 Nov 2018 23:21:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3EB101BF38C for ; Sat, 24 Nov 2018 23:21:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3A7C3877D0 for ; Sat, 24 Nov 2018 23:21:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kqwu4AhW4rv3 for ; Sat, 24 Nov 2018 23:21:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id 008F382E49 for ; Sat, 24 Nov 2018 23:21:46 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id j10so15379761wru.4 for ; Sat, 24 Nov 2018 15:21:46 -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; bh=sdl7vB/Hqu+n9DU2XFBx+mTuTo98FYalW90lDvYzedM=; b=taI2wzX+KsJG0d1zl2zSG4cJJaVpklshq6JZKSbrXq11iLlnVYeZmDI3bB9RAp03Od +n/AR//gwVslVFo+KYWr1JxFmD0eDfZFg7IoNtruMq2823xSiXOTubt/M4MIxJAybN6v cHlbM8mAfwoke98QH/99qJBBELnLCk3ORc3zTdcNVOOz6bw0qD45V29aIqlDg+cmWTRU m2C/YQHND6PzzAb59Rr4YMAWDI4WuDq+P0YAJ6/+BHTjQM81PKDNvM6QSzQTslEv6tLR 81cnofqwq7HB1G0E8+MREpCPaMCEBS1D8uaf3AUWOrLoTwD4BpsetbPXHbgw+efPzIFD J8UA== 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; bh=sdl7vB/Hqu+n9DU2XFBx+mTuTo98FYalW90lDvYzedM=; b=tV/UGEU70sOGxMax6KOyAqmwDxPuBsBYiKTA4q0A3do7LMBxUYg/mZO9nBWC1hab1Z uu87tV+AQGdU4SHpujVKxOLSpHV+P6nkW3/pZZ6IxmT+T5VSIlcbqhLLRmerXFptWys7 ZDEpl33JtmpcCZe41bCSMHqC6MdR7pY8Zc6r/wp1WQy5Y8eUAwBkimFRYfrW8fyzDyIx N2Pok4DCvYJgwWJ5eYca+91lnFLsBp3ruGhZTNuiwtlnICwg/wvpBF0p2FwTfJIGVGX1 VDTnLW+Cc3bBAyBtcbsFl5fCIMb8Jyt5tVYhgCi/YwgsxSRI5fuNDolbh83Cxti6xV0L Ha0A== X-Gm-Message-State: AA+aEWZgBqNqoiEaHr/rGBPn5Rz4HjNspT4ZjAEkXiSSa7CyfDDGiG1H rMAii22svR9z6eePJlhVzZMVlpl3 X-Google-Smtp-Source: AFSGD/WMrFJksdztF5627inu+BwYHraeaW3D6w+Zdn59E1T8AhfV0seSEjV0hAbvkuunT5NLpjREQQ== X-Received: by 2002:adf:f984:: with SMTP id f4mr18908094wrr.234.1543101705106; Sat, 24 Nov 2018 15:21:45 -0800 (PST) Received: from localhost.localdomain ([37.160.15.84]) by smtp.gmail.com with ESMTPSA id v133sm15036389wmd.4.2018.11.24.15.21.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Nov 2018 15:21:44 -0800 (PST) From: Angelo Compagnucci X-Google-Original-From: Angelo Compagnucci To: buildroot@buildroot.org Date: Sun, 25 Nov 2018 00:21:39 +0100 Message-Id: <20181124232139.14782-1-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH] package/pkg-python: fixing wrong root an prefix X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some python software refers to setuptool/distutils options to install files in python root directory (like data_files option). To use this type of option, python root should point to the real python root in buildroot folder and not to the guest os /. Prefix path is always built starting from the python root, so it should be simply /usr. Signed-off-by: Angelo Compagnucci --- package/pkg-python.mk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/package/pkg-python.mk b/package/pkg-python.mk index f57e486dad..38c5941777 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -42,10 +42,12 @@ PKG_PYTHON_DISTUTILS_BUILD_OPTS = \ --executable=/usr/bin/python PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS = \ - --prefix=$(TARGET_DIR)/usr + --prefix=/usr \ + --root=$(TARGET_DIR) \ PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS = \ - --prefix=$(STAGING_DIR)/usr + --prefix=/usr \ + --root=$(STAGING_DIR) # Host distutils-based packages HOST_PKG_PYTHON_DISTUTILS_ENV = \ @@ -66,16 +68,16 @@ PKG_PYTHON_SETUPTOOLS_ENV = \ _python_exec_prefix=/usr PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS = \ - --prefix=$(TARGET_DIR)/usr \ + --prefix=/usr \ --executable=/usr/bin/python \ --single-version-externally-managed \ - --root=/ + --root=$(TARGET_DIR) PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS = \ - --prefix=$(STAGING_DIR)/usr \ + --prefix=/usr \ --executable=/usr/bin/python \ --single-version-externally-managed \ - --root=/ + --root=$(STAGING_DIR) # Host setuptools-based packages HOST_PKG_PYTHON_SETUPTOOLS_ENV = \