~ruther/guix-local

f2b3c36bee8c232b026a66de93db38e13fbd7076 — Sharlatan Hellseher 1 year, 2 months ago a35e975
gnu: python-fenics-dijitso: Fix build.

* gnu/packages/simulation.scm (python-fenics-dijitso): Improve style,
fix build, use G-Expressions.
[phases] {check}: Respect tests? flag.
[native-inputs]: Add python-pytest-cov.

Change-Id: I4032735228d36366a7014b48e9d21606628c56a6
1 files changed, 27 insertions(+), 25 deletions(-)

M gnu/packages/simulation.scm
M gnu/packages/simulation.scm => gnu/packages/simulation.scm +27 -25
@@ 559,39 559,41 @@ some support for generating and analysing traffic scenarios..")
    (name "python-fenics-dijitso")
    (version "2019.1.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "fenics-dijitso" version))
        (sha256
          (base32
            "0lhqsq8ypdak0ahr2jnyvg07yrqp6wicjxi6k56zx24wp3qg60sc"))))
     (origin
       (method url-fetch)
       (uri (pypi-uri "fenics-dijitso" version))
       (sha256
        (base32 "0lhqsq8ypdak0ahr2jnyvg07yrqp6wicjxi6k56zx24wp3qg60sc"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'build 'mpi-setup
            #$%openmpi-setup)
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
                (setenv "HOME" "/tmp")
                (with-directory-excursion "test"
                  ;; Disable parallel tests to avoid race condition.  See
                  ;; https://github.com/pytest-dev/pytest-cov/issues/237.
                  (substitute* "runtests.sh"
                    (("for p in 1 4 8 16; do") "for p in 1; do"))
                  (invoke "./runtests.sh"))))))))
    (native-inputs
     (list python-pytest
           python-pytest-cov
           python-setuptools
           python-wheel))
    (inputs
     (list openmpi python-numpy))
    (native-inputs
     (list python-pytest python-setuptools python-wheel))
    (propagated-inputs
     (list python-mpi4py))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'build 'mpi-setup
           ,%openmpi-setup)
         (replace 'check
           (lambda* (#:key inputs #:allow-other-keys)
             (setenv "HOME" "/tmp")
             (with-guix-pytest-plugin inputs
               (with-directory-excursion "test"
                 ;; Disable parallel tests to avoid race condition.  See
                 ;; https://github.com/pytest-dev/pytest-cov/issues/237.
                 (substitute* "runtests.sh"
                   (("for p in 1 4 8 16; do")
                    "for p in 1; do"))
                 (invoke "./runtests.sh"))))))))
    (home-page "https://bitbucket.org/fenics-project/dijitso/")
    (synopsis "Distributed just-in-time building of shared libraries")
    (description
      "Dijitso provides a core component of the @code{FEniCS} framework,
     "Dijitso provides a core component of the @code{FEniCS} framework,
namely the just-in-time compilation of C++ code that is generated from
Python modules.  It is called from within a C++ library, using ctypes
to import the dynamic shared library directly.