2024-06-05 15:53:02 +00:00
{
lib ,
buildPythonPackage ,
fetchPypi ,
numpy ,
scipy ,
pytest ,
python ,
pybind11 ,
setuptools-scm ,
pythonOlder ,
2020-04-24 23:36:52 +00:00
} :
buildPythonPackage rec {
pname = " p y a m g " ;
2024-07-27 06:49:29 +00:00
version = " 5 . 2 . 1 " ;
2024-04-21 15:54:59 +00:00
pyproject = true ;
2023-07-15 17:15:38 +00:00
2024-07-27 06:49:29 +00:00
disabled = pythonOlder " 3 . 9 " ;
2020-04-24 23:36:52 +00:00
src = fetchPypi {
inherit pname version ;
2024-07-27 06:49:29 +00:00
hash = " s h a 2 5 6 - 9 E n Z N C J O U D Q B 7 n L N L u z h o p 2 J O 3 q + N f Y q R N U r q D E Z j v o = " ;
2020-04-24 23:36:52 +00:00
} ;
2024-06-05 15:53:02 +00:00
nativeBuildInputs = [ setuptools-scm ] ;
2022-03-05 16:20:37 +00:00
2020-04-24 23:36:52 +00:00
propagatedBuildInputs = [
numpy
scipy
pytest
pybind11
] ;
2023-07-15 17:15:38 +00:00
checkPhase = ''
runHook preCheck
# The `pyamg` directory in PWD doesn't have the compiled Cython modules in it, but has higher import priority compared to the properly built and installed `pyamg`.
# It's easier to just remove the package directory in PWD.
rm - r pyamg
$ { python . interpreter } - c " i m p o r t p y a m g ; p y a m g . t e s t ( ) "
runHook postCheck
'' ;
2022-03-05 16:20:37 +00:00
pythonImportsCheck = [
" p y a m g "
" p y a m g . a m g _ c o r e . e v o l u t i o n _ s t r e n g t h "
] ;
2020-04-24 23:36:52 +00:00
meta = with lib ; {
description = " A l g e b r a i c M u l t i g r i d S o l v e r s i n P y t h o n " ;
homepage = " h t t p s : / / g i t h u b . c o m / p y a m g / p y a m g " ;
2023-07-15 17:15:38 +00:00
changelog = " h t t p s : / / g i t h u b . c o m / p y a m g / p y a m g / b l o b / v ${ version } / c h a n g e l o g . m d " ;
2020-04-24 23:36:52 +00:00
license = licenses . mit ;
2024-07-31 10:19:44 +00:00
maintainers = [ ] ;
2020-04-24 23:36:52 +00:00
} ;
}