2018-04-12 14:11:04 +02:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, cython
|
2018-06-28 13:44:22 +02:00
|
|
|
, pariSupport ? true, pari # for interfacing with the PARI/GP signal handler
|
2018-04-12 14:11:04 +02:00
|
|
|
}:
|
|
|
|
|
2018-06-28 13:44:22 +02:00
|
|
|
assert pariSupport -> pari != null;
|
|
|
|
|
2018-04-12 14:11:04 +02:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cysignals";
|
2021-03-21 14:57:52 +01:00
|
|
|
version = "1.10.3";
|
2018-04-12 14:11:04 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-21 14:57:52 +01:00
|
|
|
sha256 = "sha256-XEYGxDV3UCgxb3Jf23y4lOPK4Lb9L4YqDSlxdIRptDo=";
|
2018-04-12 14:11:04 +02:00
|
|
|
};
|
|
|
|
|
2018-06-28 13:44:22 +02:00
|
|
|
# explicit check:
|
|
|
|
# build/src/cysignals/implementation.c:27:2: error: #error "cysignals must be compiled without _FORTIFY_SOURCE"
|
2018-04-12 14:11:04 +02:00
|
|
|
hardeningDisable = [
|
|
|
|
"fortify"
|
|
|
|
];
|
|
|
|
|
2018-12-29 16:16:23 +01:00
|
|
|
# known failure: https://github.com/sagemath/cysignals/blob/582dbf6a7b0f9ade0abe7a7b8720b7fb32435c3c/testgdb.py#L5
|
2018-04-12 14:11:04 +02:00
|
|
|
doCheck = false;
|
2018-12-29 16:16:23 +01:00
|
|
|
checkTarget = "check-install";
|
2018-04-12 14:11:04 +02:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Make sure cysignals-CSI is in PATH
|
|
|
|
export PATH="$out/bin:$PATH"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cython
|
2019-03-05 21:55:51 +01: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
|
2018-04-12 14:11:04 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-11-17 20:41:33 +01:00
|
|
|
meta = with lib; {
|
2018-04-12 14:11:04 +02:00
|
|
|
description = "Interrupt and signal handling for Cython";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/sagemath/cysignals/";
|
2020-11-17 20:41:33 +01:00
|
|
|
maintainers = teams.sage.members;
|
|
|
|
license = licenses.lgpl3Plus;
|
2018-04-12 14:11:04 +02:00
|
|
|
};
|
|
|
|
}
|