From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UDR6AVUiZmKSewEAbAwnHQ (envelope-from ) for ; Mon, 25 Apr 2022 06:23:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wIhbAVUiZmJCJwEAauVa8A (envelope-from ) for ; Mon, 25 Apr 2022 06:23:49 +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 9F5BB2A03F for ; Mon, 25 Apr 2022 06:23:48 +0200 (CEST) Received: from localhost ([::1]:47498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niqGI-0003Oe-6D for larch@yhetil.org; Mon, 25 Apr 2022 00:23:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nipvZ-00080O-Rk for guix-patches@gnu.org; Mon, 25 Apr 2022 00:02:27 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nipvX-0001nC-Ch for guix-patches@gnu.org; Mon, 25 Apr 2022 00:02:19 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nipvX-0008El-Au for guix-patches@gnu.org; Mon, 25 Apr 2022 00:02:19 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55104] [PATCH 074/232] gnu: python-scipy: Move input fields below arguments field. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Apr 2022 04:02:19 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55104 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55104@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 55104-submit@debbugs.gnu.org id=B55104.165085932731421 (code B ref 55104); Mon, 25 Apr 2022 04:02:19 +0000 Received: (at 55104) by debbugs.gnu.org; 25 Apr 2022 04:02:07 +0000 Received: from localhost ([127.0.0.1]:60868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nipvD-00089O-Kt for submit@debbugs.gnu.org; Mon, 25 Apr 2022 00:02:06 -0400 Received: from mail-qt1-f182.google.com ([209.85.160.182]:46068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niptx-0007sO-9w for 55104@debbugs.gnu.org; Mon, 25 Apr 2022 00:00:46 -0400 Received: by mail-qt1-f182.google.com with SMTP id x21so124826qtr.12 for <55104@debbugs.gnu.org>; Sun, 24 Apr 2022 21:00:41 -0700 (PDT) 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=as22pkiNkB3qCe7RxwvSxjmLAhfnBSrDXH19jHhj1go=; b=a6Bpa3oT8UrRwKbulJHU015OHRlL/bfW7960a2bs55ijPaVrcFaW3OswZjpjgpmceS TiLKtp9LHfra6SMEtAwXgQyz8v4jnWMDkf4WQSr6Z3jWF4x68bKNoHYahQ0HAGlky+ys 0FDx7mYPxH+ArT3fqbWYGLySnDRdgDMFcRnSsHsX8Yp10ZNAH9tK7UoEmHSa70L1VeUN Ugs8Y3fqhUWfHDMrBHpOQxmdwJ5ShCy+wyIuepZtEeBBuW2BL9qfSXX/SqjUyF0m42L5 qU3yoy7hwfWKwz5x1aImIU7kzJtmzNPFbkxwFBP3hafwRxRsyoFr70wXdHg+JShM65U3 ZI/Q== 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=as22pkiNkB3qCe7RxwvSxjmLAhfnBSrDXH19jHhj1go=; b=bVgebq258UriTlD0SBqEV7iQglBwLbsgpCy51XZWM0bO2kT1zQGm9XOI82auD/rGBk CRnuxP/kiBxfxSF1SUvPLYqBe8XKYtwwXdhWmynq4w1/bLNMZ/SMcVeoAuo1Ell9EsR6 LjB3ITp6AvLKugrEw79yucn4smG2yv/CH7Tw6s797QyrSqX/x6BYnart862pK8KJq9IJ 6/OIB42/EomLfT7SdDeXDQGYf3niZaqPOYpaMgHRe/D/M4bmA6+G9UIfjUgFfmlDFE7/ 7xGQpOMOxP8bITdTn+uhR/zXOSNVvmdeL0FtoVy5Z+l2qa3TYXbHGKwIuyG8PRreUPI7 Z4TA== X-Gm-Message-State: AOAM530CXexszdi1oD6vpcHehJUSMgV9LCyVLk7yyUc5uXyNxPQgYGkz H2SyMyiPHpScIBh7dJYsMhl0MjWP5YhVbQ== X-Google-Smtp-Source: ABdhPJxTuEb1syC+CVCfy1m4rNeWih4vJmSUDeZ0eoZqzvYRbnjkhSnOh0zC+Gt6Bw6s6Uo757r0ig== X-Received: by 2002:a05:622a:28d:b0:2f3:67c7:cdff with SMTP id z13-20020a05622a028d00b002f367c7cdffmr2317154qtw.683.1650859235662; Sun, 24 Apr 2022 21:00:35 -0700 (PDT) Received: from localhost.localdomain (dsl-150-232.b2b2c.ca. [66.158.150.232]) by smtp.gmail.com with ESMTPSA id w82-20020a376255000000b0069ee3f0ae63sm4478142qkb.45.2022.04.24.21.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Apr 2022 21:00:35 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 24 Apr 2022 23:56:40 -0400 Message-Id: <20220425035918.25683-74-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220425035918.25683-1-maxim.cournoyer@gmail.com> References: <20220425035918.25683-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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=1650860628; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=as22pkiNkB3qCe7RxwvSxjmLAhfnBSrDXH19jHhj1go=; b=OKbZJDyKsnwzRn4Vm9Yd09ewjED8KnkeHuVchbLeQ2MKSriNNrElsYU+9h1UpT96BtA9vJ 2aUGWE3MCUczXK/oAfhvqtz6GFhZvcrMbEeu2Ew27NyaRzm/u0wzSjj7mq2al1KdXUc7NM JoiVaHMvfVJLpQ8lx0ryA3E2qIEiFBSLyn2mHNYHbZRqLs6WTfQGlAcdLigsIWa6kziPB6 OuahEx9Wy/r/TFd97h3nRcJ2sZZybcQzNliARkdoaH2RCXLQvFfUDQnUGp03YT4wAWKmWX rj1GRdckqc5pZr1eOpAoLT32mbC+Ollk11o9s9ojEBE9x4PcxOl6eBLls4yeIQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650860628; a=rsa-sha256; cv=none; b=Pnm1hu4rgXBbMqLXUAb0JNIiDZUdwvviDjsZ34LU2HacdsLpIPj6xaL35jZgZirJ2h85pE C9Joutr5Vddzmo8zcv0Ijqr8HGLIJNjypjuj73/0/OgOFFLPc6l3v4DpszWH5lyA0mwGnB uPZsHUkqsTPTqK41WE7V82yIYszzxP2z71BUaMTcJH6706GnN8YoVdQGlwHemddPmTzWnh gTWRl8FlCYZJb9hZEEI11L9lJ23xUBJ6vt+jL1dWbQNrWdAQHsqM5TOsVtV2H+ZUMfR93u rzblhGJ7pQMxuuiPPdvKRHgNqe4weQ55kFv4Usdj9FZ6gDSHzsUz91SlKI6+7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=a6Bpa3oT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 7.49 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=a6Bpa3oT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 9F5BB2A03F X-Spam-Score: 7.49 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2H7WWek5RlbZ * gnu/packages/python-science.scm (python-scipy): Move inputs fields below the arguments field. [phases]: Use gexp. {configure-openblas}: Use this-package-input. {check}: Remove extraneous 'add-installed-pythonpath' call. {install-doc}: Adjust accordingly. --- gnu/packages/python-science.scm | 155 ++++++++++++++++---------------- 1 file changed, 77 insertions(+), 78 deletions(-) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 07d713e013..dfe6a66e61 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016, 2022 Efraim Flashner ;;; Copyright © 2016-2020, 2022 Marius Bakke ;;; Copyright © 2019 Tobias Geerinckx-Rice -;;; Copyright © 2019, 2021 Maxim Cournoyer +;;; Copyright © 2019, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2019 Giacomo Leidi ;;; Copyright © 2020 Pierre Langlois ;;; Copyright © 2020, 2021, 2022 Vinicius Monego @@ -79,49 +79,36 @@ (define-public python-scipy (uri (pypi-uri "scipy" version)) (sha256 (base32 "1gxsnw6viz2j3sm8ak2a8l7fcn4b2zm3kzfm8w57xxyyrzx7an5b")))) - (build-system python-build-system) - (propagated-inputs - (list python-numpy python-matplotlib python-pyparsing)) - (inputs - (list openblas pybind11)) - (native-inputs - (list python-cython - python-pydata-sphinx-theme - python-pytest - python-sphinx - python-sphinx-panels - python-numpydoc - gfortran - perl - which)) (outputs '("out" "doc")) + (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-pythran - (lambda _ - (setenv "SCIPY_USE_PYTHRAN" "0"))) - (add-before 'build 'change-home-dir - (lambda _ - ;; Change from /homeless-shelter to /tmp for write permission. - (setenv "HOME" "/tmp"))) - (add-after 'unpack 'disable-broken-tests - (lambda _ - (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py" - (("^( +)def test_threads_parallel\\(self\\):" m indent) - (string-append indent - "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" - m))) - (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py" - (("^def test_parallel_threads\\(\\):" m) - (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" - m))))) - (add-before 'build 'configure-openblas - (lambda* (#:key inputs #:allow-other-keys) - (call-with-output-file "site.cfg" - (lambda (port) - (format port - "[blas] + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'disable-pythran + (lambda _ + (setenv "SCIPY_USE_PYTHRAN" "0"))) + (add-before 'build 'change-home-dir + (lambda _ + ;; Change from /homeless-shelter to /tmp for write permission. + (setenv "HOME" "/tmp"))) + (add-after 'unpack 'disable-broken-tests + (lambda _ + (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py" + (("^( +)def test_threads_parallel\\(self\\):" m indent) + (string-append indent + "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" + m))) + (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py" + (("^def test_parallel_threads\\(\\):" m) + (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n" + m))))) + (add-before 'build 'configure-openblas + (lambda _ + (call-with-output-file "site.cfg" + (lambda (port) + (format port + "[blas] libraries = openblas library_dirs = ~a/lib include_dirs = ~a/include @@ -131,42 +118,54 @@ (define-public python-scipy library_dirs = ~a/lib atlas_libs = openblas " - (assoc-ref inputs "openblas") - (assoc-ref inputs "openblas") - (assoc-ref inputs "openblas")))))) - (add-after 'install 'install-doc - (lambda* (#:key inputs 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")) - (pyver ,(string-append "PYVER=" (version-major+minor - (package-version python)))) - ;; By default it tries to run sphinx-build through the Python - ;; interpreter which won't work with our shell wrapper. - (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build")) - ;; Make installed package available for building the - ;; documentation - (add-installed-pythonpath inputs outputs) - (with-directory-excursion "doc" - ;; Fix generation of images for mathematical expressions. - (substitute* (find-files "source" "conf\\.py") - (("pngmath_use_preview = True") - "pngmath_use_preview = False")) - (mkdir-p html) - (invoke "make" "html" pyver sphinxbuild) - (with-directory-excursion "build/html" - (for-each (lambda (file) - (let* ((dir (dirname file)) - (tgt-dir (string-append html "/" dir))) - (install-file file html))) - (find-files "."))))))) - (replace 'check - (lambda* (#:key tests? inputs outputs #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (with-directory-excursion "/tmp" - (invoke "python" "-c" - "import scipy; scipy.test(verbose=2)")))))))) + #$(this-package-input "openblas") + #$(this-package-input "openblas") + #$(this-package-input "openblas")))))) + (add-after 'install 'install-doc + (lambda* (#:key inputs 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")) + (pyver (string-append "PYVER=" + #$(version-major+minor + (package-version python)))) + ;; By default it tries to run sphinx-build through the Python + ;; interpreter which won't work with our shell wrapper. + (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build")) + ;; Make installed package available for building the + ;; documentation + (add-installed-pythonpath inputs outputs) + (with-directory-excursion "doc" + ;; Fix generation of images for mathematical expressions. + (substitute* (find-files "source" "conf\\.py") + (("pngmath_use_preview = True") + "pngmath_use_preview = False")) + (mkdir-p html) + (invoke "make" "html" pyver sphinxbuild) + (with-directory-excursion "build/html" + (for-each (lambda (file) + (let* ((dir (dirname file)) + (tgt-dir (string-append html "/" dir))) + (install-file file html))) + (find-files "."))))))) + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (with-directory-excursion "/tmp" + (invoke "python" "-c" + "import scipy; scipy.test(verbose=2)")))))))) + (propagated-inputs (list python-numpy python-matplotlib python-pyparsing)) + (inputs (list openblas pybind11)) + (native-inputs + (list python-cython + python-pydata-sphinx-theme + python-pytest + python-sphinx + python-sphinx-panels + python-numpydoc + gfortran + perl + which)) (home-page "https://www.scipy.org/") (synopsis "The Scipy library provides efficient numerical routines") (description "The SciPy library is one of the core packages that make up -- 2.34.0