depot/third_party/nixpkgs/pkgs/development/python-modules/pplpy/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

74 lines
1.2 KiB
Nix

{
lib,
fetchPypi,
buildPythonPackage,
gmp,
mpfr,
libmpc,
ppl,
cython,
cysignals,
gmpy2,
sphinx,
# Reverse dependency
sage,
}:
buildPythonPackage rec {
pname = "pplpy";
version = "0.8.10";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-1CohbIKRTc9NfAAN68mLsza4+D4Ca6XZUszNn4B07/0=";
};
buildInputs = [
gmp
mpfr
libmpc
ppl
];
nativeBuildInputs = [
sphinx # docbuild, called by make
];
propagatedBuildInputs = [
cython
cysignals
gmpy2
];
outputs = [
"out"
"doc"
];
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"
'';
passthru.tests = {
inherit sage;
};
meta = with lib; {
description = "Python wrapper for ppl";
homepage = "https://gitlab.com/videlec/pplpy";
maintainers = teams.sage.members;
license = licenses.gpl3;
};
}