2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-12-24 04:21:11 +00:00
|
|
|
, autoreconfHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
2024-04-21 15:54:59 +00:00
|
|
|
, cython
|
2020-04-24 23:36:52 +00:00
|
|
|
, pariSupport ? true, pari # for interfacing with the PARI/GP signal handler
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
# Reverse dependency
|
|
|
|
, sage
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert pariSupport -> pari != null;
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cysignals";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.11.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-Dx4yHlWgf5AchqNqHkSX9v+d/nAGgdATCjjDbk6yOMM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# explicit check:
|
|
|
|
# build/src/cysignals/implementation.c:27:2: error: #error "cysignals must be compiled without _FORTIFY_SOURCE"
|
|
|
|
hardeningDisable = [
|
|
|
|
"fortify"
|
|
|
|
];
|
|
|
|
|
|
|
|
# known failure: https://github.com/sagemath/cysignals/blob/582dbf6a7b0f9ade0abe7a7b8720b7fb32435c3c/testgdb.py#L5
|
|
|
|
doCheck = false;
|
|
|
|
checkTarget = "check-install";
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Make sure cysignals-CSI is in PATH
|
|
|
|
export PATH="$out/bin:$PATH"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optionals pariSupport [
|
|
|
|
# When cysignals is built with pari, including cysignals into the
|
|
|
|
# buildInputs of another python package will cause cython to link against
|
|
|
|
# pari.
|
|
|
|
pari
|
|
|
|
];
|
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.tests = { inherit sage; };
|
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Interrupt and signal handling for Cython";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cysignals-CSI";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/sagemath/cysignals/";
|
2020-11-21 19:51:51 +00:00
|
|
|
maintainers = teams.sage.members;
|
|
|
|
license = licenses.lgpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|