20 buildPythonPackage rec {
25 disabled = isPyPy || pythonOlder "3.7";
27 src = fetchFromGitHub {
30 tag = "gmpy2-${version}";
31 hash = "sha256-luLEDEY1cezhzZo4fXmM/MUg2YyAaz7n0HwSpbNayP8=";
34 build-system = [ setuptools ];
42 # make relative imports in tests work properly
55 lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
56 # issue with some overflow logic
60 ++ lib.optionals stdenv.hostPlatform.isDarwin [
61 # TypeError: mpq() requires numeric or string argument
62 # not sure why it only fails on Darwin
63 "test_mpq_from_Decimal"
66 pythonImportsCheck = [ "gmpy2" ];
73 changelog = "https://github.com/aleaxit/gmpy/blob/${src.rev}/docs/history.rst";
74 description = "Interface to GMP, MPFR, and MPC for Python 3.7+";
75 homepage = "https://github.com/aleaxit/gmpy/";
76 license = lib.licenses.lgpl3Plus;
77 maintainers = with lib.maintainers; [ tomasajt ];