12 buildPythonPackage rec {
14 # upgrade may break sage, please test the sage build or ping @timokau on upgrade
16 format = "setuptools";
19 inherit pname version;
20 sha256 = "sha256-GiWGXDTyCx3JWDB5jjSrZDbieLjgyA3HvwqzTF2wOrg=";
24 # patch to avoid some segfaults in sage's totallyreal.pyx test.
25 # (https://trac.sagemath.org/ticket/27267).
27 name = "use-trashcan-for-gen.patch";
28 url = "https://raw.githubusercontent.com/sagemath/sage/b6ea17ef8e4d652de0a85047bac8d41e90b25555/build/pkgs/cypari/patches/trashcan.patch";
29 hash = "sha256-w4kktWb9/aR9z4CjrUvAMOxEwRN2WkubaKzQttN8rU8=";
34 # generate cythonized extensions (auto_paridecl.pxd is crucial)
35 ${python.pythonOnBuildForHost.interpreter} setup.py build_ext --inplace
46 propagatedBuildInputs = [
52 test -f "$out/${python.sitePackages}/cypari2/auto_paridecl.pxd"
57 description = "Cython bindings for PARI";
58 license = licenses.gpl2Plus;
59 maintainers = teams.sage.members;
60 homepage = "https://github.com/defeo/cypari2";