2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
gmp,
|
|
|
|
mpfr,
|
|
|
|
libmpc,
|
|
|
|
ppl,
|
|
|
|
cython,
|
|
|
|
cysignals,
|
|
|
|
gmpy2,
|
|
|
|
sphinx,
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# Reverse dependency
|
|
|
|
sage,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pplpy";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.8.10";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-1CohbIKRTc9NfAAN68mLsza4+D4Ca6XZUszNn4B07/0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gmp
|
|
|
|
mpfr
|
|
|
|
libmpc
|
|
|
|
ppl
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
sphinx # docbuild, called by make
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2020-04-24 23:36:52 +00:00
|
|
|
cysignals
|
|
|
|
gmpy2
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"doc"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
# Find the build result in order to put it into PYTHONPATH. The doc
|
|
|
|
# build needs to import pplpy.
|
|
|
|
build_result="$PWD/$( find build/ -type d -name 'lib.*' | head -n1 )"
|
|
|
|
|
|
|
|
echo "Building documentation"
|
|
|
|
PYTHONPATH="$build_result:$PYTHONPATH" make -C docs html
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$doc/share/doc"
|
|
|
|
mv docs/build/html "$doc/share/doc/pplpy"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit sage;
|
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python wrapper for ppl";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://gitlab.com/videlec/pplpy";
|
2020-11-21 19:51:51 +00:00
|
|
|
maintainers = teams.sage.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
};
|
|
|
|
}
|