2018-04-11 09:25:50 -07:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, python
|
|
|
|
, fetchPypi
|
|
|
|
, pari
|
|
|
|
, gmp
|
|
|
|
, cython
|
|
|
|
, cysignals
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cypari2";
|
2018-10-22 04:26:13 -07:00
|
|
|
# upgrade may break sage, please test the sage build or ping @timokau on upgrade
|
2020-11-29 06:04:26 -08:00
|
|
|
version = "2.1.2";
|
2018-04-11 09:25:50 -07:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 06:04:26 -08:00
|
|
|
sha256 = "03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a";
|
2018-04-11 09:25:50 -07: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 13:50:27 -08:00
|
|
|
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
2018-04-11 09:25:50 -07:00
|
|
|
|
|
|
|
# install "." instead of "*.whl"
|
2019-01-02 11:09:44 -08:00
|
|
|
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install --no-index --prefix=$out --no-cache --build=tmpdir .
|
2018-04-11 09:25:50 -07:00
|
|
|
'';
|
|
|
|
|
2019-02-15 00:42:51 -08:00
|
|
|
nativeBuildInputs = [
|
2018-04-11 09:25:50 -07:00
|
|
|
pari
|
2019-02-15 00:42:51 -08:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2018-04-11 09:25:50 -07:00
|
|
|
gmp
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cysignals
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
make check
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Cython bindings for PARI";
|
|
|
|
license = licenses.gpl2;
|
2020-11-17 11:41:33 -08:00
|
|
|
maintainers = teams.sage.members;
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/defeo/cypari2";
|
2018-04-11 09:25:50 -07:00
|
|
|
};
|
|
|
|
}
|