mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-pyamg: Regenerate bundled files.
* gnu/packages/python-science.scm (python-pyamg) [source]: Delete auto-generated files. [arguments] <#:phases>: Add 'amg-core-bind-them phase to re-generate *_bind.cpp files deleted in snippet. [native-inputs]: Add python-cppheaderparser and python-pyyaml. [description]: Improve style, omit implementation details. Change-Id: I6f68914cd912e6f4592e51c21b129847e73be847
This commit is contained in:
parent
ae77d94839
commit
77a07a968f
1 changed files with 41 additions and 9 deletions
|
@ -513,32 +513,64 @@ spheres, cubes, etc.")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "pyamg" version))
|
(uri (pypi-uri "pyamg" version))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
;; Delete autogenerated files, regenerate in a phase.
|
||||||
|
#~(begin
|
||||||
|
(for-each
|
||||||
|
(lambda (file)
|
||||||
|
(delete-file (string-append "pyamg/amg_core/" file)))
|
||||||
|
'("air_bind.cpp"
|
||||||
|
"evolution_strength_bind.cpp"
|
||||||
|
"graph_bind.cpp"
|
||||||
|
"krylov_bind.cpp"
|
||||||
|
"linalg_bind.cpp"
|
||||||
|
"relaxation_bind.cpp"
|
||||||
|
"ruge_stuben_bind.cpp"
|
||||||
|
"smoothed_aggregation_bind.cpp"
|
||||||
|
"tests/bind_examples_bind.cpp"))))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0l3dliwynxyjvbgpmi2k8jqvkkw6fc00c8w69h6swhrkfh0ql12z"))))
|
"0l3dliwynxyjvbgpmi2k8jqvkkw6fc00c8w69h6swhrkfh0ql12z"))))
|
||||||
(build-system pyproject-build-system)
|
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:test-flags
|
#:test-flags
|
||||||
;; Test installed package in order to find C++ modules.
|
;; Test installed package in order to find C++ modules.
|
||||||
#~(list "--pyargs" "pyamg.tests")))
|
#~(list "--pyargs" "pyamg.tests")
|
||||||
(native-inputs (list pybind11 python-pytest python-setuptools-scm))
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
;; Regenerate the autogenerated files.
|
||||||
|
(add-after 'unpack 'amg-core-bind-them
|
||||||
|
(lambda _
|
||||||
|
;; bindthem.py heavily depends on location to produce *_bind.cpp
|
||||||
|
;; file, make it available in tests as well.
|
||||||
|
(copy-file "pyamg/amg_core/bindthem.py"
|
||||||
|
"pyamg/amg_core/tests/bindthem.py")
|
||||||
|
(with-directory-excursion "pyamg/amg_core"
|
||||||
|
(substitute* "bindthem.py"
|
||||||
|
(("/usr/bin/env python3") (which "python3")))
|
||||||
|
(invoke "sh" "generate.sh"))
|
||||||
|
(with-directory-excursion "pyamg/amg_core/tests"
|
||||||
|
(invoke "python" "bindthem.py" "bind_examples.h")))))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(native-inputs
|
||||||
|
(list pybind11
|
||||||
|
python-cppheaderparser
|
||||||
|
python-pytest
|
||||||
|
python-pyyaml
|
||||||
|
python-setuptools-scm))
|
||||||
(propagated-inputs (list python-numpy python-scipy))
|
(propagated-inputs (list python-numpy python-scipy))
|
||||||
(home-page "https://github.com/pyamg/pyamg")
|
(home-page "https://github.com/pyamg/pyamg")
|
||||||
(synopsis "Algebraic Multigrid Solvers in Python")
|
(synopsis "Algebraic Multigrid Solvers in Python")
|
||||||
(description "PyAMG is a Python library of Algebraic Multigrid
|
(description "PyAMG is a Python library of Algebraic Multigrid
|
||||||
(AMG) solvers.
|
(AMG) solvers. It features implementations of:
|
||||||
|
|
||||||
PyAMG features implementations of:
|
|
||||||
@itemize
|
@itemize
|
||||||
@item Ruge-Stuben (RS) or Classical AMG
|
@item Ruge-Stuben (RS) or Classical AMG
|
||||||
@item AMG based on Smoothed Aggregation (SA)
|
@item AMG based on Smoothed Aggregation (SA)
|
||||||
@item Adaptive Smoothed Aggregation (αSA)
|
@item Adaptive Smoothed Aggregation (αSA)
|
||||||
@item Compatible Relaxation (CR)
|
@item Compatible Relaxation (CR)
|
||||||
@item Krylov methods such as CG, GMRES, FGMRES, BiCGStab, MINRES, etc.
|
@item Krylov methods such as CG, GMRES, FGMRES, BiCGStab, MINRES, etc.
|
||||||
@end itemize
|
@end itemize")
|
||||||
PyAMG is primarily written in Python with supporting C++ code for
|
|
||||||
performance critical operations.")
|
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public python-tspex
|
(define-public python-tspex
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue