11 buildPythonPackage rec {
16 # Python 3.11 has finally made changes to its C API for which gmpy 1.17,
17 # published in 2013, would require patching. It seems unlikely that any
18 # patches will be forthcoming.
19 disabled = isPyPy || pythonAtLeast "3.11";
21 src = fetchFromGitHub {
24 rev = "refs/tags/gmpy_${lib.replaceStrings [ "." ] [ "_" ] version}";
25 hash = "sha256-kMidOjhKJlDRu2qaiq9c+XcwD1tNAoPhRTvvGcOJe8I=";
28 build-system = [ setuptools ];
30 buildInputs = [ gmp ];
32 pythonImportsCheck = [ "gmpy" ];
35 description = "GMP or MPIR interface to Python 2.4+ and 3.x";
36 homepage = "https://github.com/aleaxit/gmpy/";
37 license = lib.licenses.lgpl21Plus;