Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC94FC433EF for ; Fri, 7 Jan 2022 23:13:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A82C760B14; Fri, 7 Jan 2022 23:13:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c14zHN6BjUPs; Fri, 7 Jan 2022 23:13:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 2080A60AFE; Fri, 7 Jan 2022 23:13:01 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2D06E1BF36E for ; Fri, 7 Jan 2022 23:12:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 18E28424CD for ; Fri, 7 Jan 2022 23:12:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HvNsrvFNxRil for ; Fri, 7 Jan 2022 23:12:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp2.osuosl.org (Postfix) with ESMTPS id 0F4BA4034A for ; Fri, 7 Jan 2022 23:12:57 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id E9410C0007; Fri, 7 Jan 2022 23:12:54 +0000 (UTC) From: Thomas Petazzoni To: "Arnout Vandecappelle (Essensium/Mind)" , Buildroot List Date: Sat, 8 Jan 2022 00:12:52 +0100 Message-Id: <20220107231253.1546336-1-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/python-numpy: simplify PYTHON_NUMPY_FIXUP_NPY_PKG_CONFIG_FILES X-BeenThere: buildroot@buildroot.org 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: Samuel Martin , Asaf Kahlon , Thomas Petazzoni Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The PYTHON_NUMPY_FIXUP_NPY_PKG_CONFIG_FILES macro was introduced in commit 2426002d6fc81d0b023e3f3b3ee4e94ab29438cb ("package/python-numpy: fixup npymath.ini for numpy extensions"). However, it turns out that by using $(PYTHON3_PATH), we can simplify the intermediate variables, to the point where they are no longer needed. Not having the intermediate variables makes the logic a bit easier to understand. Also, the logic is changed to use a single sed expression, which we pass to $(SED). Signed-off-by: Thomas Petazzoni --- package/python-numpy/python-numpy.mk | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk index f367b556ef..9e8b032b78 100644 --- a/package/python-numpy/python-numpy.mk +++ b/package/python-numpy/python-numpy.mk @@ -40,12 +40,9 @@ endef # it uses host libraries (like libnpymath.a). # So, the numpy distutils extension packages would explicitly link this # config path for their package environment. -PYTHON_NUMPY_STAGING_DIR = $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy -PYTHON_NUMPY_NPY_PKG_CONFIG_PATH=$(PYTHON_NUMPY_STAGING_DIR)/core/lib/npy-pkg-config define PYTHON_NUMPY_FIXUP_NPY_PKG_CONFIG_FILES - sed -e '/^pkgdir=/d' \ - -e '/^prefix=/i pkgdir=$(PYTHON_NUMPY_STAGING_DIR)/core' \ - -i $(PYTHON_NUMPY_NPY_PKG_CONFIG_PATH)/npymath.ini + $(SED) '/^pkgdir=/d;/^prefix=/i pkgdir=$(PYTHON3_PATH)/site-packages/numpy/core' \ + $(PYTHON3_PATH)/site-packages/numpy/core/lib/npy-pkg-config/npymath.ini endef PYTHON_NUMPY_POST_INSTALL_STAGING_HOOKS += PYTHON_NUMPY_FIXUP_NPY_PKG_CONFIG_FILES -- 2.33.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot