mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 04:29:25 -05:00
gnu: python-jplephem: Use ADD-INSTALLED-PYTHONPATH.
* gnu/packages/astronomy.scm (python-jplephem)[arguments]: Use ADD-INSTALLED-PYTHONPATH instead of setting PYTHONPATH directly; run tests conditionally.
This commit is contained in:
parent
e711ad3185
commit
823e855bd0
1 changed files with 6 additions and 8 deletions
|
@ -1061,14 +1061,12 @@ (define-public python-jplephem
|
|||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'check
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(setenv "PYTHONPATH"
|
||||
(string-append "./build/lib:"
|
||||
(getenv "PYTHONPATH")))
|
||||
(setenv "PATH" (string-append out "/bin:"
|
||||
(getenv "PATH")))
|
||||
(invoke "python" "-m" "unittest" "discover" "-s" "test")))))))
|
||||
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
||||
(when tests?
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(add-installed-pythonpath inputs outputs)
|
||||
(setenv "PATH" (string-append out "/bin:" (getenv "PATH")))
|
||||
(invoke "python" "-m" "unittest" "discover" "-s" "test"))))))))
|
||||
(inputs
|
||||
`(("python-numpy" ,python-numpy)))
|
||||
(home-page "https://github.com/brandon-rhodes/python-jplephem")
|
||||
|
|
Loading…
Reference in a new issue