2018-04-11 17:25:50 +01:00
|
|
|
{ stdenv
|
|
|
|
, bootstrapped-pip
|
|
|
|
, buildPythonPackage
|
|
|
|
, python
|
|
|
|
, fetchPypi
|
|
|
|
, pari
|
|
|
|
, gmp
|
|
|
|
, cython
|
|
|
|
, cysignals
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cypari2";
|
2018-10-22 12:26:13 +01:00
|
|
|
# upgrade may break sage, please test the sage build or ping @timokau on upgrade
|
2018-11-04 10:34:56 +00:00
|
|
|
version = "2.0.0";
|
2018-04-11 17:25:50 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-11-04 10:34:56 +00:00
|
|
|
sha256 = "3512d8a78217dfd3ac431b470453342188f70b2053386678a1ec3c74aae7427a";
|
2018-04-11 17:25:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# This differs slightly from the default python installPhase in that it pip-installs
|
|
|
|
# "." instead of "*.whl".
|
|
|
|
# That is because while the default install phase succeeds to build the package,
|
|
|
|
# it fails to generate the file "auto_paridecl.pxd".
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/lib/${python.libPrefix}/site-packages"
|
|
|
|
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
|
|
|
|
|
|
|
|
# install "." instead of "*.whl"
|
|
|
|
${bootstrapped-pip}/bin/pip install --no-index --prefix=$out --no-cache --build=tmpdir .
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pari
|
|
|
|
gmp
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cysignals
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
make check
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Cython bindings for PARI";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ timokau ];
|
|
|
|
homepage = https://github.com/defeo/cypari2;
|
|
|
|
};
|
|
|
|
}
|