Files
nixpkgs/pkgs/development/python-modules/cypari2/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

56 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
python,
fetchPypi,
pari,
gmp,
cython,
cysignals,
# Reverse dependency
sage,
}:
buildPythonPackage rec {
pname = "cypari2";
# upgrade may break sage, please test the sage build or ping @timokau on upgrade
version = "2.2.2";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-E6M4c16iIcEGj4/EFVYb93fYxoclcCvHSVRyZP0JFyA=";
};
preBuild = ''
# generate cythonized extensions (auto_paridecl.pxd is crucial)
${python.pythonOnBuildForHost.interpreter} setup.py build_ext --inplace
'';
nativeBuildInputs = [ pari ];
buildInputs = [ gmp ];
propagatedBuildInputs = [
cysignals
cython
];
checkPhase = ''
test -f "$out/${python.sitePackages}/cypari2/auto_paridecl.pxd"
make check
'';
passthru.tests = {
inherit sage;
};
meta = {
description = "Cython bindings for PARI";
license = lib.licenses.gpl2Plus;
teams = [ lib.teams.sage ];
homepage = "https://github.com/defeo/cypari2";
};
}