From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4Lw1D/JKImPkxAAAbAwnHQ (envelope-from ) for ; Wed, 14 Sep 2022 23:43:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QPEAD/JKImNcOQEA9RJhRA (envelope-from ) for ; Wed, 14 Sep 2022 23:43:14 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CC6D41245D for ; Wed, 14 Sep 2022 23:43:13 +0200 (CEST) Received: from localhost ([::1]:47372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYaA5-00056n-1n for larch@yhetil.org; Wed, 14 Sep 2022 17:43:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYa9u-00056c-SL for guix-patches@gnu.org; Wed, 14 Sep 2022 17:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYa9u-0002F6-Ff for guix-patches@gnu.org; Wed, 14 Sep 2022 17:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYa9u-0001GD-AH for guix-patches@gnu.org; Wed, 14 Sep 2022 17:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57814] [PATCH 2/2] gnu: python-scipy: Update to 1.9.1. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Sep 2022 21:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57814 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57814@debbugs.gnu.org Received: via spool by 57814-submit@debbugs.gnu.org id=B57814.16631917494797 (code B ref 57814); Wed, 14 Sep 2022 21:43:02 +0000 Received: (at 57814) by debbugs.gnu.org; 14 Sep 2022 21:42:29 +0000 Received: from localhost ([127.0.0.1]:56461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYa9M-0001FI-Qx for submit@debbugs.gnu.org; Wed, 14 Sep 2022 17:42:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYa9H-0001En-EG for 57814@debbugs.gnu.org; Wed, 14 Sep 2022 17:42:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38022) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYa9C-00024O-8X for 57814@debbugs.gnu.org; Wed, 14 Sep 2022 17:42:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=pUp9zRQ/Fh8ozb/VvPWSn0aNKnoAasXQa4R1PAqZMFA=; b=Iq4PkMO2TxKjOof/B7AA +PPl2Ho8aBzDxj2Lp0U00aBCq+qozqyEWyiNbIJTFgA77Blw/gieJuctj+wkm8EsLgz23tNa2vHCG zOA9gL8EDUO9Ib8126ZAmwLy2snwxcUWTt/FCqIX/KG1gDLFVT2a0DZLsOXwsUB6Xe5GAQLpo2XWl zvKQQImnPA3AeK8sh/sahbIFqhIP7vCwIMyqb5Zl86UdZKfCokPun6DtAE6ilkhRDDNYPjRnmB+sJ nPyEhkRkFXDhXRaj5CsfIdXQ2TkZxxaBfDz81nijd+r6M3/eUuFUcxSC0KqUnhreFx15nu4302/89 tucNByXJImzQDQ==; Received: from [84.214.173.6] (port=46810 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYa9B-0002VA-Jz for 57814@debbugs.gnu.org; Wed, 14 Sep 2022 17:42:18 -0400 From: Marius Bakke Date: Wed, 14 Sep 2022 23:42:10 +0200 Message-Id: <20220914214210.16228-2-marius@gnu.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220914214210.16228-1-marius@gnu.org> References: <20220914213630.15597-1-marius@gnu.org> <20220914214210.16228-1-marius@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663191793; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pUp9zRQ/Fh8ozb/VvPWSn0aNKnoAasXQa4R1PAqZMFA=; b=KDh1k1GVWaqWuAkmkvzi+zPjGyXuEyUfFzODw9um4tv6LT/LaCyz76X9Im3ffDBUY0fAql oFnjEbzNLfXTV+E3cBaGPJEnNYSlklrkCIXlJ0/Xy01oyf8kvxcepnVvJaraCGgFrjXupI cfFq1d3OolKOQmNqpQWC52HS5TVf6fzUg2GdyPJqEg9WQP0G9LtWZqkhqg8CrcvsweGhLQ jzsqDWiIHCORSU+FQiNL+fI/rifdSycYZm32tOQtonHMGY/siAR1LkIcJVwxwn8sGwYieQ Z20qGlNlbJ8fdMvpE6dBuQqUADoJ5nhogftSMoBR/MUXcUIVGUKJGOP9USMnMA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663191793; a=rsa-sha256; cv=none; b=YJ1KI7oFSQKvFv1heeS8C0tK+rvmVYl0MxkDIF692CidEius3V7uwgYqBtRgswqQYFAg/F BJpd8b9fHBHueix/CebO8RDNUYaXOXGt51PkrZV9S+cmDlAJAWtVCROfFXrezej2LCNE3a UTf0aXdIST+4Run5eiJ03E3AONWHGYqmuzqCFKR69LsFzXGSD5TFRPtbjVOZrrx0iQqk5v ILpD81QH8B7ObqNlZwo5TLNDBoNNdM8eKOg8dfQ1KUSv7gk4LDLcN5/j0pgE0jT/NEz9Bl ZzNMWyDjkc2DW6Yjg4bq8KJHHa84RZUclEe2bc7LIGzUYlgyQWzQf8Un+8Oj7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Iq4PkMO2; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Iq4PkMO2; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CC6D41245D X-Spam-Score: -3.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: IiinR3eR1uOf * gnu/packages/python-science.scm (python-scipy): Update to 1.9.1. [source]: Switch to GIT-FETCH. [outputs]: Remove. [arguments]: Don't disable Pythran. Don't configure OpenBLAS which is now discovered by pkg-config. Do a "manual" PEP 517 style build. Make install-doc phase conditional on the presence of Sphinx. Simplify tests. [propagated-inputs]: Add PYTHON-PYTHRAN. [native-inputs]: Remove PERL, WHICH, PYTHON-NUMPYDOC, PYTHON-PYDATA-SPHINX-THEME, PYTHON-SPHINX, and PYTHON-SPHINX-PANELS. Add GCC, PKG-CONFIG, PYTHON-PYPA-BUILD and PYTHON-MESON. --- gnu/packages/python-science.scm | 112 +++++++++++++++++--------------- 1 file changed, 59 insertions(+), 53 deletions(-) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 9a75bf3089..d1698e5f67 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -42,6 +42,7 @@ (define-module (gnu packages python-science) #:use-module (gnu packages base) #:use-module (gnu packages bioinformatics) #:use-module (gnu packages boost) + #:use-module (gnu packages build-tools) #:use-module (gnu packages check) #:use-module (gnu packages cpp) #:use-module (gnu packages databases) @@ -75,81 +76,86 @@ (define-module (gnu packages python-science) (define-public python-scipy (package (name "python-scipy") - (version "1.8.0") + (version "1.9.1") (source (origin (method url-fetch) (uri (pypi-uri "scipy" version)) (sha256 - (base32 "1gghkwn93niyasm36333xbqrnn3yiadq9d97wnc9mg14nzbg5m1i")))) - (outputs '("out" "doc")) + (base32 "1jcb94xal7w7ax80kaivqqics36v8smi4a3xngyxbrh0i538rli6")))) (build-system python-build-system) (arguments (list - #:modules '((guix build utils) - (guix build python-build-system) - (ice-9 format)) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'disable-pythran - (lambda _ - (setenv "SCIPY_USE_PYTHRAN" "0"))) - (add-before 'build 'change-home-dir + (add-after 'unpack 'loosen-requirements (lambda _ - ;; Change from /homeless-shelter to /tmp for write permission. - (setenv "HOME" "/tmp"))) - (add-before 'build 'configure-openblas + (substitute* "pyproject.toml" + (("numpy==") "numpy>=") + (("meson==") "meson>=")))) + (replace 'build (lambda _ - (call-with-output-file "site.cfg" - (lambda (port) - (format port - "\ -[blas] -libraries = openblas -library_dirs = ~a/lib -include_dirs = ~:*~a/include - -[atlas] -library_dirs = ~:*~a/lib -atlas_libs = openblas~%" #$(this-package-input "openblas")))))) - (add-before 'build 'parallelize-build + ;; ZIP does not support timestamps before 1980. + (setenv "SOURCE_DATE_EPOCH" "315532800") + (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) + (replace 'install (lambda _ - (setenv "NPY_NUM_BUILD_JOBS" - (number->string (parallel-job-count))))) - (add-before 'check 'install-doc - (lambda* (#:key outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append data "/doc/" #$name "-" #$version)) - (html (string-append doc "/html"))) - (with-directory-excursion "doc" - ;; Build doc. - (invoke "make" "html" - ;; Building the documentation takes a very long time. - ;; Parallelize it. - (string-append "SPHINXOPTS=-j" - (number->string (parallel-job-count)))) - ;; Install doc. - (mkdir-p html) - (copy-recursively "build/html" html))))) + (let ((whl (car (find-files "dist" "\\.whl$")))) + (invoke "pip" "--no-cache-dir" "--no-input" + "install" "--no-deps" "--prefix" #$output whl)))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? - (invoke "./runtests.py" "-vv" "--no-build" "--mode=fast" - "-j" (number->string (parallel-job-count))))))))) - (propagated-inputs (list python-numpy python-matplotlib python-pyparsing)) + ;; Step out of the source directory to avoid interference. + (with-directory-excursion "/tmp" + (invoke "python" "-c" + (string-append + "import scipy; scipy.test('fast', parallel=" + (number->string (parallel-job-count)) + ", verbose=2)")))))) + (add-after 'check 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + ;; FIXME: Documentation cannot be built because it requires + ;; a newer version of pydata-sphinx-theme, which currently + ;; cannot build without internet access: + ;; . + ;; Keep the phase for easy testing. + (let ((sphinx-build (false-if-exception + (search-input-file input "bin/sphinx-build")))) + (if sphinx-build + (let* ((doc (assoc-ref outputs "doc")) + (data (string-append doc "/share")) + (docdir (string-append + data "/doc/" + #$(package-name this-package) "-" + #$(package-version this-package))) + (html (string-append docdir "/html"))) + (with-directory-excursion "doc" + ;; Build doc. + (invoke "make" "html" + ;; Building the documentation takes a very long time. + ;; Parallelize it. + (string-append "SPHINXOPTS=-j" + (number->string (parallel-job-count)))) + ;; Install doc. + (mkdir-p html) + (copy-recursively "build/html" html))) + (format #t "sphinx-build not found, skipping~%")))))))) + (propagated-inputs + (list python-numpy python-matplotlib python-pyparsing python-pythran)) (inputs (list openblas pybind11)) (native-inputs (list gfortran - perl + ;; XXX: Adding gfortran shadows GCC headers, causing a compilation + ;; failure. Somehow also providing GCC works around it ... + gcc + meson-python + pkg-config python-cython - python-numpydoc - python-pydata-sphinx-theme + python-pypa-build python-pytest python-pytest-xdist - python-sphinx - python-sphinx-panels - python-threadpoolctl - which)) + python-threadpoolctl)) (home-page "https://scipy.org/") (synopsis "The Scipy library provides efficient numerical routines") (description "The SciPy library is one of the core packages that make up -- 2.37.3