diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-11-26 23:34:05 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-12-19 14:35:20 +0900 |
| commit | 0b6c957ca18ba90d1517dd80b3ec90e66fcbfc47 (patch) | |
| tree | afdfac30ecdcfd87026bb2a406c0b0a54e9b0540 /gnu/packages/python-science.scm | |
| parent | 1de944c18bf2bf964ce22901bb098e267d4dfc13 (diff) | |
gnu: Add pyre.
* gnu/packages/python-science.scm (pyre): New variable.
Change-Id: I4a26d7a83f24210104cb0ab50b5392ab97d9bfc4
Diffstat (limited to 'gnu/packages/python-science.scm')
| -rw-r--r-- | gnu/packages/python-science.scm | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index fb518c162d9..8de49ac7ea6 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #:use-module (gnu packages check) | 53 | #:use-module (gnu packages check) |
| 54 | #:use-module (gnu packages chemistry) | 54 | #:use-module (gnu packages chemistry) |
| 55 | #:use-module (gnu packages cmake) | 55 | #:use-module (gnu packages cmake) |
| 56 | #:use-module (gnu packages compression) | ||
| 56 | #:use-module (gnu packages cpp) | 57 | #:use-module (gnu packages cpp) |
| 57 | #:use-module (gnu packages crates-io) | 58 | #:use-module (gnu packages crates-io) |
| 58 | #:use-module (gnu packages crypto) | 59 | #:use-module (gnu packages crypto) |
| @@ -78,6 +79,7 @@ | |||
| 78 | #:use-module (gnu packages rust-apps) | 79 | #:use-module (gnu packages rust-apps) |
| 79 | #:use-module (gnu packages simulation) | 80 | #:use-module (gnu packages simulation) |
| 80 | #:use-module (gnu packages sphinx) | 81 | #:use-module (gnu packages sphinx) |
| 82 | #:use-module (gnu packages ssh) | ||
| 81 | #:use-module (gnu packages statistics) | 83 | #:use-module (gnu packages statistics) |
| 82 | #:use-module (gnu packages time) | 84 | #:use-module (gnu packages time) |
| 83 | #:use-module (gnu packages xdisorg) | 85 | #:use-module (gnu packages xdisorg) |
| @@ -89,9 +91,89 @@ | |||
| 89 | #:use-module (guix git-download) | 91 | #:use-module (guix git-download) |
| 90 | #:use-module (guix utils) | 92 | #:use-module (guix utils) |
| 91 | #:use-module (guix build-system cargo) | 93 | #:use-module (guix build-system cargo) |
| 94 | #:use-module (guix build-system cmake) | ||
| 92 | #:use-module (guix build-system python) | 95 | #:use-module (guix build-system python) |
| 93 | #:use-module (guix build-system pyproject)) | 96 | #:use-module (guix build-system pyproject)) |
| 94 | 97 | ||
| 98 | (define-public pyre | ||
| 99 | (package | ||
| 100 | (name "pyre") | ||
| 101 | (version "1.12.5") | ||
| 102 | (source | ||
| 103 | (origin | ||
| 104 | (method git-fetch) | ||
| 105 | (uri (git-reference | ||
| 106 | (url "https://github.com/pyre/pyre") | ||
| 107 | (commit (string-append "v" version)))) | ||
| 108 | (file-name (git-file-name name version)) | ||
| 109 | (sha256 | ||
| 110 | (base32 | ||
| 111 | "0crmssga481q2ggwcmj40nj5n9975wri14p609jdr9hwg4vdyvj2")))) | ||
| 112 | (build-system cmake-build-system) | ||
| 113 | (arguments | ||
| 114 | (list | ||
| 115 | #:imported-modules (append %cmake-build-system-modules | ||
| 116 | %python-build-system-modules) | ||
| 117 | #:modules '((guix build cmake-build-system) | ||
| 118 | ((guix build python-build-system) #:prefix python:) | ||
| 119 | (guix build utils)) | ||
| 120 | #:configure-flags | ||
| 121 | #~(list (string-append "-DPYRE_VERSION=" #$version) | ||
| 122 | (string-append "-DPYRE_DEST_PACKAGES=" | ||
| 123 | (python:site-packages %build-inputs %outputs))) | ||
| 124 | #:phases | ||
| 125 | #~(modify-phases %standard-phases | ||
| 126 | (add-after 'unpack 'enable-bytecode-determinism | ||
| 127 | (assoc-ref python:%standard-phases 'enable-bytecode-determinism)) | ||
| 128 | ;; Move the check phase after the Python 'pyre' module | ||
| 129 | ;; is installed and made available. | ||
| 130 | (delete 'check) | ||
| 131 | (add-after 'install 'add-to-pythonpath | ||
| 132 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 133 | (python:add-installed-pythonpath inputs outputs))) | ||
| 134 | (add-after 'add-to-pythonpath 'wrap | ||
| 135 | (assoc-ref python:%standard-phases 'wrap)) | ||
| 136 | (add-after 'add-to-pythonpath 'check | ||
| 137 | (lambda* (#:key tests? parallel-tests? #:allow-other-keys) | ||
| 138 | (when tests? | ||
| 139 | (setenv "CTEST_OUTPUT_ON_FAILURE" "1") | ||
| 140 | (let ((ignored-tests | ||
| 141 | (list | ||
| 142 | ;; The MPI tests are failing for unknown reasons (see: | ||
| 143 | ;; https://github.com/pyre/pyre/issues/126). | ||
| 144 | "tests.mpi" | ||
| 145 | ;; These tests have a cleanup phase that fails | ||
| 146 | ;; non-deterministically (see: | ||
| 147 | ;; https://github.com/pyre/pyre/issues/125). | ||
| 148 | "tests.pyre.lib.viz.flow" | ||
| 149 | ;; This test expects a TCP port 22 to be listening. | ||
| 150 | "tests.pyre.pkg.ipc.tcp.py" | ||
| 151 | ;; These postgres tests require a running postgresql | ||
| 152 | ;; daemon; they are also skipped in upstream CI. | ||
| 153 | "tests.postgres.ext" | ||
| 154 | ;; This test fails due to pre-1980 timestamps, not | ||
| 155 | ;; supported by ZIP. | ||
| 156 | "tests.pyre.pkg.filesystem.zip_open.py" | ||
| 157 | ;; This one trips on the patched python3 shebang. | ||
| 158 | "tests.pyre.pkg.filesystem.local_open.py"))) | ||
| 159 | (invoke "ctest" | ||
| 160 | "-j" (if parallel-tests? | ||
| 161 | (number->string (parallel-job-count)) | ||
| 162 | "1") | ||
| 163 | "-E" (string-join ignored-tests "|"))))))))) | ||
| 164 | (native-inputs (list openssh-sans-x python python-numpy pybind11 zip)) | ||
| 165 | (inputs (list gsl hdf5 openmpi postgresql)) | ||
| 166 | (propagated-inputs (list python-pyyaml)) ;for the Python bindings | ||
| 167 | (home-page "http://pyre.orthologue.com/") | ||
| 168 | (synopsis "Framework for building Scientific applications") | ||
| 169 | (description | ||
| 170 | "This package provides a framework for building scientific applications. | ||
| 171 | It aims to bring state of the art software design practices to scientific | ||
| 172 | computing, with the goal of providing a strong skeleton on which to build | ||
| 173 | scientific codes by steering the implementation towards usability and | ||
| 174 | maintainability.") | ||
| 175 | (license license:bsd-3))) | ||
| 176 | |||
| 95 | (define-public python-cvxpy | 177 | (define-public python-cvxpy |
| 96 | (package | 178 | (package |
| 97 | (name "python-cvxpy") | 179 | (name "python-cvxpy") |
