1{ lib 2, fetchPypi 3, buildPythonPackage 4, cython 5, pariSupport ? true, pari # for interfacing with the PARI/GP signal handler 6}: 7 8assert pariSupport -> pari != null; 9 10buildPythonPackage rec { 11 pname = "cysignals"; 12 version = "1.10.3"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "sha256-XEYGxDV3UCgxb3Jf23y4lOPK4Lb9L4YqDSlxdIRptDo="; 17 }; 18 19 # explicit check: 20 # build/src/cysignals/implementation.c:27:2: error: #error "cysignals must be compiled without _FORTIFY_SOURCE" 21 hardeningDisable = [ 22 "fortify" 23 ]; 24 25 # known failure: https://github.com/sagemath/cysignals/blob/582dbf6a7b0f9ade0abe7a7b8720b7fb32435c3c/testgdb.py#L5 26 doCheck = false; 27 checkTarget = "check-install"; 28 29 preCheck = '' 30 # Make sure cysignals-CSI is in PATH 31 export PATH="$out/bin:$PATH" 32 ''; 33 34 propagatedBuildInputs = [ 35 cython 36 ] ++ lib.optionals pariSupport [ 37 # When cysignals is built with pari, including cysignals into the 38 # buildInputs of another python package will cause cython to link against 39 # pari. 40 pari 41 ]; 42 43 enableParallelBuilding = true; 44 45 meta = with lib; { 46 description = "Interrupt and signal handling for Cython"; 47 homepage = "https://github.com/sagemath/cysignals/"; 48 maintainers = teams.sage.members; 49 license = licenses.lgpl3Plus; 50 }; 51}