From patchwork Sat Mar 21 19:02:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1052 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D5FD73F337 for ; Sat, 21 Mar 2020 20:03:18 +0100 (CET) Received: by mail-pj1-f72.google.com with SMTP id np3sf6750082pjb.7 for ; Sat, 21 Mar 2020 12:03:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1584817397; cv=pass; d=google.com; s=arc-20160816; b=CTTW1yMNshlnh4zDT7BZ5E1AghoCPylVAf4peb83qRXVrOPwaQZuOcYGFSF97+Hf91 ogV0kdhwWJ2UxO3mErDE4S2r+3s1UNx8q71tj6kMmd7SKHlyyqwfjmLA3w5aoAV0FG+r UM58ILRlpnSPRXSehrtqbGIEUWys1EX6HQ2+FjmYq4lbg0MLnca94hvsQ4YT0cuZU9I/ JbUwnOsiUc7MeMGiOLBLF2qws3gEymO0TD3+AfJbmz7suB52fpCvLODaSNNA+gPtuGnb 8eDb61F55tddLifKAnW9vaW5fineoIl8fykMFDRmh/mf+1iURNH1PsHJcg6ssQrEdo4k ZfBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=imNm8jmaiBoZH7SlExMRqWoI9uLqH3AUS9fKw9kMnKI=; b=q4oHdBP6KJm/Vn+lMTu/jKrXHcDCp4KeVtQtoVviFIuHQ23bEQo286hxBvzu9k/Kh6 LT72T41NpaYKBLhoyTOzlU2/FR97QpVM9R6PMDKgyzJ8JvBL3CH7bGjJzWsiaVq6984f X3zRCkKODCYqXERvU1cSBcFRm3iD4+dsIkAUQwWnXqpOu5fxyKUPsX024fCkIh5F/Msp a2r+qE3VU/YVZ8WElWvY6Ii9Ju1VXMM8QcDdLymv0JoX6R6YaYk77VRpl9X4kX7Dksij AkTqRc/yHveSQX0pd6XtxTXpZNJ/o5Ly6SrJPZwSzuizC/W923LxjrAsfLUoeR3PVuNv 3ezA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MhP6z5PI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=imNm8jmaiBoZH7SlExMRqWoI9uLqH3AUS9fKw9kMnKI=; b=AhTgWDSigecpcJfmrlkUc17F0ER5tkDzLlnVQIlX/SqItxwlXinYfPAso6S5ZxrBWr eE0CcGOeuGAZB+HqpPBf1o0+RDjEA7O+lBItFjYiJAMeF7lrN2cMCtz5wtUnyeaKHV9l rgOl5GxRQEQUd61BucsCYOp1jZUL0EaEuAJTw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=imNm8jmaiBoZH7SlExMRqWoI9uLqH3AUS9fKw9kMnKI=; b=mZjxl8KJU9EgormGIQPt/gsrH5np5pd7/J1NnmhtNTLJHL7LBcAF1sYIAUqzVjt/4W 6H79uilBQmkXeXl9mpmkqvoIDJ0WK2St0B4oODLALff3ZT21PUKrCzb95O0/uzgQ5AMs e5OYH0nHzdtrPqVnWO1LkhPMuOuPt1zPwTpck8Aibu0nEhz50DPmOvcnxNhBCL6GOpQW WjF+RjcoSwreZnh3lhP5mE4tMjNQfogCunFtkmlJq5fJGsT/uVkwnGi4gRAG5xQ7udL7 chE48s2gddcuiYVVOQ7YN35SwNWpx0/9lLumvl0sGzRn34kYxAZPvLjcniGYoxy1eE5L bceg== X-Gm-Message-State: ANhLgQ1BBkQlzB5cFUJcLMFFwjwMGcZcZCRP1euhz0TRhtucVmZ8pug6 NHvZlDIhFnc22xNtfau4pgGBDVc5 X-Google-Smtp-Source: ADFU+vvMfrYD8byt2o+VZD8Ukij4MyB7GnuXruJMQnImE4JzCW5NgFdww/1GdD3MbNqfSED6oq6qEA== X-Received: by 2002:a17:902:d202:: with SMTP id t2mr14847523ply.5.1584817397418; Sat, 21 Mar 2020 12:03:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:16d5:: with SMTP id 204ls5113430pfw.3.gmail; Sat, 21 Mar 2020 12:03:16 -0700 (PDT) X-Received: by 2002:a63:8042:: with SMTP id j63mr14192680pgd.224.1584817396679; Sat, 21 Mar 2020 12:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584817396; cv=none; d=google.com; s=arc-20160816; b=JjLVAhJ8dMtsr/1/Eoe8w2LNzJaCbvU2dg60lIDwME9o8r6YYyGZqlwP49VIr6El0L K+/eUIpZMI3IRwqkKx+EKBfHU4qQSdawiKV0gK2UhCJDpA8uqfeMtBJYk9MXMyz/Wolf P0KRaEgUDr+vEL7NplByzZbeXXgIOwctp7TQyXb5kzMTw4ZVS7oO4A2gbjbOummQlZpH HxRTUbOpi004n8yBF4wAJL8rfuJwwBnTC/IMfC/5BQGbZaLOVUB2PD1VZ4oR5S7PB/rq m4IiebYB4iOpB2bqKBx0MUgB7FlpZJy0jdJ+sVRHuMXrBCLgEkWiciXg8cnwxgD7DVTs UvRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VZbDcAHGmnnJtkwFZeCixFtNLqbaTK0aWJax8VBGlJ4=; b=KbsNWOSuc0l+pSeJk5s+X2iVgMRN7g1G1UJgFK8MqKlfBqGoK501cJzNcD/vWfppKq 9Tg2WmJWB99TEgM+v9oIwMSbHwL7yGd3aYWp1XdKxnAEqfBAEZGuT93/KceSyK5LY5OX upLf4t83Vy+17BE/ytcx/mmiyqJOeqV3xknikZbO63qCMXjuwS1gQyyPyepxLyyenTH4 ICzw7lgdJNtloPgQhiKpXYtEdrUJfsk2nQ6QIH+SWn0UE8UUWtje9Cd2rJpyFdHZzj68 l08Ki/n4wq8jE7GVJ+7kBMPqKyyrxtXEV/wnozgvt7HmkWlN0PYpWamVmecxv7QlJK4w NoIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MhP6z5PI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y67sor11716295pfg.60.2020.03.21.12.03.16 for (Google Transport Security); Sat, 21 Mar 2020 12:03:16 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a62:2f01:: with SMTP id v1mr16162222pfv.136.1584817396261; Sat, 21 Mar 2020 12:03:16 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:4d9c:1ea0:b435:7b90]) by smtp.gmail.com with ESMTPSA id k3sm8113377pgr.40.2020.03.21.12.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Mar 2020 12:03:15 -0700 (PDT) From: Jagan Teki To: buildroot@buildroot.org Cc: Angelo Compagnucci , Suniel Mahesh , Esben Haabendal , Yegor Yefremov , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v7 2/4] package/python-numpy: fixup npymath.ini for numpy extensions Date: Sun, 22 Mar 2020 00:32:39 +0530 Message-Id: <20200321190241.3590-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200321190241.3590-1-jagan@amarulasolutions.com> References: <20200321190241.3590-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MhP6z5PI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Esben Haabendal Inorder to build the numpy distutils extension packages like python-scipy, python-numba, it require an explicit pkg-config path fixup for npymath.ini. This pkg-config path fixup would update the prefix path of npymath.ini with actual target staging area where numpy core was built, so-that numpy distutils extension packages would explicitly link this config path for their package environment. Without this extension packages cannot find -lnpymath since it uses host libraries (like libnpymath.a). So, attach the post install staging hook with pkg-config path fixup for npymath.ini. Signed-off-by: Esben Haabendal Signed-off-by: Jagan Teki --- Changes for v7: - rephrase commit and comments of fixup npymath.ini package/python-numpy/python-numpy.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk index 3f0df7a640..4d2e852b43 100644 --- a/package/python-numpy/python-numpy.mk +++ b/package/python-numpy/python-numpy.mk @@ -32,6 +32,21 @@ define PYTHON_NUMPY_CONFIGURE_CMDS echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg endef +# Fixup the npymath.ini prefix path with actual target staging area where +# numpy core was built. Without this, target builds using numpy distutils +# extensions like python-scipy, python-numba cannot find -lnpymath since +# 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 +endef +PYTHON_NUMPY_POST_INSTALL_STAGING_HOOKS += PYTHON_NUMPY_FIXUP_NPY_PKG_CONFIG_FILES + # Some package may include few headers from NumPy, so let's install it # in the staging area. PYTHON_NUMPY_INSTALL_STAGING = YES