2018-04-11 17:25:50 +01:00
|
|
|
{ stdenv
|
|
|
|
, 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
|
2019-04-06 22:46:13 +01:00
|
|
|
version = "2.1.0";
|
2018-04-11 17:25:50 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-04-06 22:46:13 +01:00
|
|
|
sha256 = "0bm5jvmwqp48n6b385mw4v7wsws9zk62mgb7xf5ymiq7k6wgvxli";
|
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 = ''
|
2019-01-14 21:50:27 +00:00
|
|
|
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
2018-04-11 17:25:50 +01:00
|
|
|
|
|
|
|
# install "." instead of "*.whl"
|
2019-01-02 19:09:44 +00:00
|
|
|
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install --no-index --prefix=$out --no-cache --build=tmpdir .
|
2018-04-11 17:25:50 +01:00
|
|
|
'';
|
|
|
|
|
2019-02-15 08:42:51 +00:00
|
|
|
nativeBuildInputs = [
|
2018-04-11 17:25:50 +01:00
|
|
|
pari
|
2019-02-15 08:42:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2018-04-11 17:25:50 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|