12 buildPythonPackage rec {
14 # upgrade may break sage, please test the sage build or ping @timokau on upgrade
18 inherit pname version;
19 sha256 = "17beb467d3cb39fffec3227c468f0dd8db8a09129faeb95a6bb4c84b2b6c6683";
23 # patch to avoid some segfaults in sage's totallyreal.pyx test.
24 # (https://trac.sagemath.org/ticket/27267). depends on Cython patch.
26 name = "use-trashcan-for-gen.patch";
27 url = "https://raw.githubusercontent.com/sagemath/sage/b6ea17ef8e4d652de0a85047bac8d41e90b25555/build/pkgs/cypari/patches/trashcan.patch";
28 hash = "sha256-w4kktWb9/aR9z4CjrUvAMOxEwRN2WkubaKzQttN8rU8=";
32 # This differs slightly from the default python installPhase in that it pip-installs
33 # "." instead of "*.whl".
34 # That is because while the default install phase succeeds to build the package,
35 # it fails to generate the file "auto_paridecl.pxd".
37 export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
39 # install "." instead of "*.whl"
40 pip install . --no-index --no-warn-script-location --prefix="$out" --no-cache
45 python.pythonOnBuildForHost.pkgs.pip
52 propagatedBuildInputs = [
62 description = "Cython bindings for PARI";
63 license = licenses.gpl2Plus;
64 maintainers = teams.sage.members;
65 homepage = "https://github.com/defeo/cypari2";