2020-04-24 23:36:52 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, numpy
, scipy
, pytest
2023-07-15 17:15:38 +00:00
, python
2020-04-24 23:36:52 +00:00
, pybind11
2022-03-05 16:20:37 +00:00
, setuptools-scm
2023-07-15 17:15:38 +00:00
, pythonOlder
2020-04-24 23:36:52 +00:00
} :
buildPythonPackage rec {
pname = " p y a m g " ;
2023-07-15 17:15:38 +00:00
version = " 5 . 0 . 1 " ;
format = " s e t u p t o o l s " ;
disabled = pythonOlder " 3 . 7 " ;
2020-04-24 23:36:52 +00:00
src = fetchPypi {
inherit pname version ;
2023-07-15 17:15:38 +00:00
hash = " s h a 2 5 6 - X w S K A X Q z Q 6 4 N T I Y j B g B z h s + 5 s U R T x H r f 2 t J 3 6 3 m k b V A = " ;
2020-04-24 23:36:52 +00:00
} ;
2022-03-05 16:20:37 +00:00
nativeBuildInputs = [
setuptools-scm
] ;
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 ;
2023-08-04 22:07:22 +00:00
maintainers = [ ] ;
2020-04-24 23:36:52 +00:00
} ;
}