From patchwork Fri Aug 5 14:36:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Bres X-Patchwork-Id: 1664084 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lzp8B4D6mz9s2R for ; Sat, 6 Aug 2022 00:36:58 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 587E360FB8; Fri, 5 Aug 2022 14:36:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 587E360FB8 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 73VjAv89KVlM; Fri, 5 Aug 2022 14:36:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 715C460B93; Fri, 5 Aug 2022 14:36:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 715C460B93 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 329F31BF868 for ; Fri, 5 Aug 2022 14:36:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1A63183E90 for ; Fri, 5 Aug 2022 14:36:53 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1A63183E90 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tCHreW_y3lgL for ; Fri, 5 Aug 2022 14:36:52 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4DFF483E85 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by smtp1.osuosl.org (Postfix) with ESMTPS id 4DFF483E85 for ; Fri, 5 Aug 2022 14:36:52 +0000 (UTC) Received: by mail-wr1-x42a.google.com with SMTP id j1so3513014wrw.1 for ; Fri, 05 Aug 2022 07:36:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zEWUOvLwSeO6U1OBJlFr/FN6yQySsKjEemGsbJDjPzo=; b=zZ/ePmWrkeTtN+SL9pJX4eg5ZeQ5Q8z08ujy0SO5M8UWhrm07RQTqXxdmFJ9nA3/aH 1zSKvcUsRK+74Jpz1oy5ZoH0mDsyinDzGZTMUwIkj1NdlSy9qzqX+V2+dWHZAcXNOa89 8K8VFnG3ydmTOu6OYbpoN1BbIduaUyEfb6YL8UA0df6WOi2MpI/1j8t7YiYsvZvCNXM0 B9ujXO04NyHtY2fLMMJrlTi4snmVBr8s11zC13rjp+X80iZMZQAsopYN9dZHQVsF2d9r mQAUNqJHtUPyKg7+hG/3/ieR0m0XCVq6uKm5wWsRZB5jlmluUftMrGQcC/Ep2NCNzpWi ok5A== X-Gm-Message-State: ACgBeo1KikdHpluEau80B6xCLs1J0jLoyWmqFOjAP+zJDeXqsfSDEJPd VllKOrG0ivrtcPLsFguy8gzY0ingKjg= X-Google-Smtp-Source: AA6agR4XgRWhvL+yh6ikZobPp2hnO9fO8R9COgbPlAW9I6gELGDUg65y9Wrm4Nfbnih7Lz7NbfktzQ== X-Received: by 2002:a5d:6252:0:b0:21e:4457:1bca with SMTP id m18-20020a5d6252000000b0021e44571bcamr4487804wrv.287.1659710210116; Fri, 05 Aug 2022 07:36:50 -0700 (PDT) Received: from pc-140.home ([2a01:cb1c:794:2300:d109:33e7:bc94:49e5]) by smtp.gmail.com with ESMTPSA id b3-20020a05600010c300b002206261cb6esm4082031wrx.66.2022.08.05.07.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 07:36:49 -0700 (PDT) From: "Guillaume W. Bres" To: buildroot@busybox.net Date: Fri, 5 Aug 2022 16:36:24 +0200 Message-Id: <20220805143625.16542-1-guillaume.bressaix@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zEWUOvLwSeO6U1OBJlFr/FN6yQySsKjEemGsbJDjPzo=; b=mr3Nz2vz/201PQ19LX8x7G56V79pv/OwJB7kn5QZpMKL72O3YV4gRUauxewI65KU5J z2JLdos53NifewCIvBxk7YavkHwysAR07xTz6mNqL27VzCya3antWN0xdpaVvJekzu7z /BL1rMUEqTjcm9xliEV2M5gz6dYZ53FP1rPNoD9YOHTi4BhER1TJgabb/XVDqMMko5Oe mGFuN7QoINk0bVtXpyTEEyMkhjpzU0NzMkEz52YqVKP5RKruP9l1zcipA+QsvExnIR4m lT/39G5kvcFtxtQX8cipyevD1PNg6A6oPfOmXEYrvsceGnJn/8SIGzUCWmfphkhG387l YaOA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=mr3Nz2vz Subject: [Buildroot] [RFC v3 1/2] package/pkg-meson.mk: support fortran cross-compilation 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: "Guillaume W. Bres" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" python-scipy is moving to a meson build infrastructure, and requires fortran cross-compilation Signed-off-by: Guillaume W. Bres --- package/pkg-meson.mk | 2 ++ support/misc/cross-compilation.conf.in | 3 +++ 2 files changed, 5 insertions(+) diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index 156b005fdd..32d41170f3 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -76,10 +76,12 @@ define PKG_MESON_CROSSCONFIG_SED -e "s%@TARGET_CC@%$(TARGET_CC)%g" \ -e "s%@TARGET_CXX@%$(TARGET_CXX)%g" \ -e "s%@TARGET_AR@%$(TARGET_AR)%g" \ + -e "s%@TARGET_FC@%$(TARGET_FC)%g" \ -e "s%@TARGET_STRIP@%$(TARGET_STRIP)%g" \ -e "s%@TARGET_ARCH@%$(PKG_MESON_TARGET_CPU_FAMILY)%g" \ -e "s%@TARGET_CPU@%$(GCC_TARGET_CPU)%g" \ -e "s%@TARGET_ENDIAN@%$(call qstrip,$(call LOWERCASE,$(BR2_ENDIAN)))%g" \ + -e "s%@TARGET_FCFLAGS@%$(call make-sq-comma-list,$($(strip $(2))))%g" \ -e "s%@TARGET_CFLAGS@%$(call make-sq-comma-list,$($(strip $(1))))%g" \ -e "s%@TARGET_LDFLAGS@%$(call make-sq-comma-list,$($(strip $(3))))%g" \ -e "s%@TARGET_CXXFLAGS@%$(call make-sq-comma-list,$($(strip $(2))))%g" \ diff --git a/support/misc/cross-compilation.conf.in b/support/misc/cross-compilation.conf.in index 235e5a8495..7053df472b 100644 --- a/support/misc/cross-compilation.conf.in +++ b/support/misc/cross-compilation.conf.in @@ -9,6 +9,7 @@ cpp = '@TARGET_CXX@' ar = '@TARGET_AR@' strip = '@TARGET_STRIP@' cmake = '@BR2_CMAKE@' +fortran = '@TARGET_FC@' pkgconfig = '@PKGCONF_HOST_BINARY@' g-ir-compiler = '@STAGING_DIR@/usr/bin/g-ir-compiler' g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner' @@ -18,6 +19,8 @@ c_args = [@TARGET_CFLAGS@] c_link_args = [@TARGET_LDFLAGS@] cpp_args = [@TARGET_CXXFLAGS@] cpp_link_args = [@TARGET_LDFLAGS@] +fortran_args = [@TARGET_FCFLAGS@] +fortran_link_args = [@TARGET_LDFLAGS@] wrap_mode = 'nodownload' cmake_prefix_path = '@STAGING_DIR@/usr/lib/cmake' From patchwork Fri Aug 5 14:36:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Bres X-Patchwork-Id: 1664085 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lzp8S3h8Yz9s2R for ; Sat, 6 Aug 2022 00:37:12 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6A9B360B1D; Fri, 5 Aug 2022 14:37:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6A9B360B1D 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 zlLr0M1ADZTP; Fri, 5 Aug 2022 14:37:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 1D9586F970; Fri, 5 Aug 2022 14:37:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1D9586F970 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 89AEA1BF868 for ; Fri, 5 Aug 2022 14:37:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 648DF83E90 for ; Fri, 5 Aug 2022 14:37:04 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 648DF83E90 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yth_UFxbxa3F for ; Fri, 5 Aug 2022 14:37:03 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D689783E85 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by smtp1.osuosl.org (Postfix) with ESMTPS id D689783E85 for ; Fri, 5 Aug 2022 14:37:02 +0000 (UTC) Received: by mail-wm1-x32e.google.com with SMTP id n20-20020a05600c3b9400b003a4f2261a7eso1376717wms.2 for ; Fri, 05 Aug 2022 07:37:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Dq60yWtRDK5rou2AZnd/LS6JtS3pC3mQRN0AlXTuYMY=; b=oyEv9GpsmvoD38ij4EIhomuSE5kbfJnhd65DDie4DxsFJOi7DPzXE/XVox9JqlXZjS /07V6St6TekeXCkfT6cWCszS4p47uxzqGs4TIA9ZyvnSniuaUAI1EGkmBraPWZLYrhtb Krms4/wbsEy2eXSO4tzRu/ggNvU8KmiZu3Es5hMyDphOcVweFLqdcROiV910vRoV3lJw Awq01rFSOLavYcyceJF1xSvp38rmFARq/MD6rwMng/uyBEgIsJcoaywV1JJrih12seFC RfU5095atJwy3Aa/5JhqFN66QzlMRq/KgGNOMN77yQU6Po5jQ2dVP1tZTepcT1+O1fbm n6dw== X-Gm-Message-State: ACgBeo2KWKEjWaeFeNWmnvHE2c1wRA7o53Al8uQRn1kCD0PoqKODKnRN wilpIbclApIb4bu9+bswF04i2xAY3W4= X-Google-Smtp-Source: AA6agR58txrOWF8ciNxxvHbZa4vjQVElQf04ELEis48yAdSFzXJ69TR/6i3x6QGO+MIcm+iA40aRyg== X-Received: by 2002:a1c:a3c4:0:b0:3a4:eea2:b8dc with SMTP id m187-20020a1ca3c4000000b003a4eea2b8dcmr9589190wme.171.1659710220701; Fri, 05 Aug 2022 07:37:00 -0700 (PDT) Received: from pc-140.home ([2a01:cb1c:794:2300:d109:33e7:bc94:49e5]) by smtp.gmail.com with ESMTPSA id b3-20020a05600010c300b002206261cb6esm4082031wrx.66.2022.08.05.07.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 07:37:00 -0700 (PDT) From: "Guillaume W. Bres" To: buildroot@busybox.net Date: Fri, 5 Aug 2022 16:36:25 +0200 Message-Id: <20220805143625.16542-2-guillaume.bressaix@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220805143625.16542-1-guillaume.bressaix@gmail.com> References: <20220805143625.16542-1-guillaume.bressaix@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dq60yWtRDK5rou2AZnd/LS6JtS3pC3mQRN0AlXTuYMY=; b=ZOjsUnzQk44CAKEsViwtm05fBqZSABVr0oD6rHd3++HDv+ig4GB6BM7yMATRzUNCnK Rs4gmFeJzbsw0gbh7Q2w7l1mP2UUwou9Xofm/GUlYCta1sc0cRNTQN0SzpKPHs82kwE3 lduYtz73Cw233VI5ok3Xnwa8N5keYia3jo+2WuJvqy+VSztQlLOF8wO+5bv6/AT8B7Nf /PXVzueNiY7rqfj2e62c+GzHwmQ3urg0zRCgQsuIk5dKHvOwaz8pQAxtt+TlYgEyVgVW tXs/7JjMwnbXepMZi3vo1wlPjqIofUWLYwZTPYDJtDzbDNLxlbxjMNkwA18gTWbDqK1A ZoVg== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ZOjsUnzQ Subject: [Buildroot] [RFC v3 2/2] package/python-scipy: bump version to 1.9.0 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: "Guillaume W. Bres" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" SciPy is moving to a meson build infrastructure. The current meson build scripts deduce all internal locations based on the host-python location, which is incorrect when dealing with "npyrandom" and "npymath", that are included in code that gets cross-compiled. https://github.com/scipy/scipy/issues/14812 Signed-off-by: Guillaume W. Bres --- As expected, moving to meson already makes things much easier for us, as meson is capable of deducing a cross-compilation context and can take advantage of pkg-config too. Also, the distutils approach will get removed before 1.12.0. The npy core lib "problem" is acknowledged by the scipy dev team and we can expect improved behavior in the next releases. Ralf Gommers from the team provided valuable input for this patch serie, thank you! Run the runtime test with ./support/testing/run-tests -d dl -o test -k test.package.test_python_scipy.TestPythonPy3SciPy --- ...uild-fix-numpy-core-include-location.patch | 33 +++++++++++++++ package/python-scipy/python-scipy.hash | 2 +- package/python-scipy/python-scipy.mk | 42 +++++++++---------- 3 files changed, 53 insertions(+), 24 deletions(-) create mode 100644 package/python-scipy/0001-scipy-meson.build-fix-numpy-core-include-location.patch diff --git a/package/python-scipy/0001-scipy-meson.build-fix-numpy-core-include-location.patch b/package/python-scipy/0001-scipy-meson.build-fix-numpy-core-include-location.patch new file mode 100644 index 0000000000..3b5ee78f3e --- /dev/null +++ b/package/python-scipy/0001-scipy-meson.build-fix-numpy-core-include-location.patch @@ -0,0 +1,33 @@ +From 3045d4ebc83dda5922175758adc74018aebccdd1 Mon Sep 17 00:00:00 2001 +From: "Guillaume W. Bres" +Date: Fri, 5 Aug 2022 16:02:21 +0200 +Subject: [PATCH] scipy/meson.build: fix numpy core include location + +The numpy core location is deduced from host-python, +while we will include lib npyrandom and npymath when cross compiling. +These two must be previously cross-compiled. + +Signed-off-by: Guillaume W. Bres +--- + scipy/meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scipy/meson.build b/scipy/meson.build +index 76bb3606e..f65601aee 100644 +--- a/scipy/meson.build ++++ b/scipy/meson.build +@@ -52,9 +52,9 @@ inc_f2py = include_directories(incdir_f2py) + fortranobject_c = incdir_f2py / 'fortranobject.c' + + cc = meson.get_compiler('c') +-npymath_path = incdir_numpy / '..' / 'lib' ++npymath_path = @NUMPY_SYSROOT_INCDIR@ / '..' / 'lib' + npymath_lib = cc.find_library('npymath', dirs: npymath_path) +-npyrandom_path = incdir_numpy / '..' / '..' / 'random' / 'lib' ++npyrandom_path = @NUMPY_SYSROOT_INCDIR@ / '..' / '..' / 'random' / 'lib' + # Note: `required: false` can be removed once numpy 1.19 is the minimum version + npyrandom_lib = cc.find_library('npyrandom', dirs: npyrandom_path, required: false) + +-- +2.30.2 + diff --git a/package/python-scipy/python-scipy.hash b/package/python-scipy/python-scipy.hash index 0274679c43..6637faf5b4 100644 --- a/package/python-scipy/python-scipy.hash +++ b/package/python-scipy/python-scipy.hash @@ -1,5 +1,5 @@ # Locally generated -sha256 0140dd24d14ce194fdb3df496c2190f0896ca84ac98bf5d69c3b3fb7bde1a1e9 scipy-1.8.1.tar.xz +sha256 c0dfd7d2429452e7e94904c6a3af63cbaa3cf51b348bd9d35b42db7e9ad42791 scipy-1.9.0.tar.gz sha256 96599f8ec69a2cc609265eed13fc75090aacb28742260e55ce623788a33da19c LICENSE.txt sha256 37e64a498894ac7c3b070023e3689e954a8ecf8a23b90968d09a455f1b4f7b35 scipy/linalg/src/lapack_deprecations/LICENSE sha256 606209a000716c5f66e33e180ce08434b96ed17db4975ab9723c6b5fbcc89609 scipy/ndimage/LICENSE.txt diff --git a/package/python-scipy/python-scipy.mk b/package/python-scipy/python-scipy.mk index b5006a2e15..cb0b078e0b 100644 --- a/package/python-scipy/python-scipy.mk +++ b/package/python-scipy/python-scipy.mk @@ -4,8 +4,8 @@ # ################################################################################ -PYTHON_SCIPY_VERSION = 1.8.1 -PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.xz +PYTHON_SCIPY_VERSION = 1.9.0 +PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.gz PYTHON_SCIPY_SITE = https://github.com/scipy/scipy/releases/download/v$(PYTHON_SCIPY_VERSION) PYTHON_SCIPY_LICENSE = \ BSD-3-Clause, \ @@ -23,6 +23,7 @@ PYTHON_SCIPY_LICENSE_FILES = \ scipy/sparse/linalg/_eigen/arpack/ARPACK/COPYING \ scipy/spatial/qhull_src/COPYING.txt PYTHON_SCIPY_DEPENDENCIES += \ + host-pkgconf \ host-python-numpy \ host-python-pythran \ zlib \ @@ -31,26 +32,21 @@ PYTHON_SCIPY_DEPENDENCIES += \ python-pybind PYTHON_SCIPY_INSTALL_STAGING = YES -PYTHON_SCIPY_SETUP_TYPE = setuptools -PYTHON_SCIPY_BUILD_OPTS = config_fc --fcompiler=gnu95 - -PYTHON_SCIPY_LDFLAGS = $(TARGET_LDFLAGS) -shared \ - -L$(PYTHON3_PATH)/site-packages/numpy/core/lib -# -lnpyrandom localization -PYTHON_SCIPY_LDFLAGS += \ - -L$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy/random/lib - -PYTHON_SCIPY_ENV = \ - F90=$(TARGET_FC) \ - LDFLAGS="$(PYTHON_SCIPY_LDFLAGS)" - -# Provide system configuration options to numpy distutils extensions, telling -# to find all include files and libraries in staging directory. -define PYTHON_SCIPY_CONFIGURE_CMDS - -rm -f $(@D)/site.cfg - echo "[DEFAULT]" >> $(@D)/site.cfg - echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg - echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg +# the meson.build infrastructure, currently uses host-python +# for code generation, f2py invokation, but also to determine +# all internal dependencies location. It is incorrect regarging +# libnpyrandom and libnpymath because we need the cross-compiled version +# for these two +# sed -i 's/@NUMPY_SYSROOT_INCDIR@/$(STAGING_DIR)\/usr\/lib\/python$(PYTHON3_VERSION_MAJOR)\/site-packages\/numpy/' $(@D)/scipy/meson.build +define PYTHON_SCIPY_FIX_NUMPY_CORE_SYSROOT_LOCATION + sed -i \ + "s:@NUMPY_SYSROOT_INCDIR@:'$(STAGING_DIR)\/usr\/lib\/python$(PYTHON3_VERSION_MAJOR)\/site-packages\/numpy\/core\/include\/':" \ + $(@D)/scipy/meson.build endef +PYTHON_SCIPY_PRE_CONFIGURE_HOOKS += PYTHON_SCIPY_FIX_NUMPY_CORE_SYSROOT_LOCATION + +PYTHON_SCIPY_CONF_OPTS = \ + -Dblas=lapack \ + -Dlapack=lapack -$(eval $(python-package)) +$(eval $(meson-package))