at 23.05-pre 1.4 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, fetchpatch 5, buildPythonPackage 6, pkgconfig 7, gmp 8, pari 9, mpfr 10, fplll 11, cython 12, cysignals 13, numpy 14, pytest 15}: 16 17buildPythonPackage rec { 18 pname = "fpylll"; 19 version = "0.5.7"; 20 21 src = fetchFromGitHub { 22 owner = "fplll"; 23 repo = "fpylll"; 24 rev = version; 25 sha256 = "sha256-iUPreJ8BSB8LDisbJis0xn8ld6+Nf9Z4AP8SWJlCfZg="; 26 }; 27 28 patches = [ 29 (fetchpatch { 30 name = "remove-strategies-doctest.patch"; 31 url = "https://github.com/fplll/fpylll/commit/3edffcd189e9d827a322d83b0f84d32e5f067442.patch"; 32 sha256 = "sha256-U7qOIbVzUNwYmjOPryjnE3J+MX/vMwm3T0UyOZ5ylLc="; 33 }) 34 ]; 35 36 buildInputs = [ 37 gmp 38 pari 39 mpfr 40 fplll 41 ]; 42 43 propagatedBuildInputs = [ 44 cython 45 cysignals 46 numpy 47 ]; 48 49 nativeBuildInputs = [ 50 pkgconfig 51 ]; 52 53 checkInputs = [ 54 pytest 55 ]; 56 57 checkPhase = '' 58 # Since upstream introduced --doctest-modules in 59 # https://github.com/fplll/fpylll/commit/9732fdb40cf1bd43ad1f60762ec0a8401743fc79, 60 # it is necessary to ignore import mismatches. Not sure why, but the files 61 # should be identical anyway. 62 PY_IGNORE_IMPORTMISMATCH=1 pytest 63 ''; 64 65 meta = with lib; { 66 description = "A Python interface for fplll"; 67 changelog = "https://github.com/fplll/fpylll/releases/tag/${version}"; 68 homepage = "https://github.com/fplll/fpylll"; 69 maintainers = teams.sage.members; 70 license = licenses.gpl2Plus; 71 }; 72}