2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gmpy2,
|
|
|
|
isPyPy,
|
|
|
|
setuptools,
|
|
|
|
pytestCheckHook,
|
|
|
|
|
|
|
|
# Reverse dependency
|
|
|
|
sage,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mpmath";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "1.3.0";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mpmath";
|
|
|
|
repo = "mpmath";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-9BGcaC3TyolGeO65/H42T/WQY6z5vc1h+MA+8MGFChU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2021-04-26 19:14:03 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
gmpy = lib.optionals (!isPyPy) [ gmpy2 ];
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit sage;
|
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://mpmath.org/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Pure-Python library for multiprecision floating arithmetic";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
2024-06-05 15:53:02 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|