2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2023-08-22 20:05:09 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gmpy2
|
|
|
|
, isPyPy
|
|
|
|
, setuptools
|
2022-11-21 17:40:18 +00:00
|
|
|
, pytestCheckHook
|
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
|
|
|
};
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
nativeBuildInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
setuptools
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
gmpy = lib.optionals (!isPyPy) [
|
|
|
|
gmpy2
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-21 17:40:18 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://mpmath.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A pure-Python library for multiprecision floating arithmetic";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|