Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 66 lines 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, mpmath 5, numpy 6, pipdate 7, pybind11 8, pyfma 9, eigen 10, pytestCheckHook 11, matplotlib 12, isPy27 13}: 14 15buildPythonPackage rec { 16 pname = "accupy"; 17 version = "0.3.2"; 18 disabled = isPy27; 19 20 src = fetchPypi { 21 inherit pname version; 22 sha256 = "be5c8c9ef2f83c9eeddac85463879957c87a93b257a6202a76ad6b43080b32f9"; 23 }; 24 25 buildInputs = [ 26 pybind11 eigen 27 ]; 28 29 propagatedBuildInputs = [ 30 mpmath 31 numpy 32 pipdate 33 pyfma 34 ]; 35 36 checkInputs = [ 37 pytestCheckHook 38 matplotlib 39 ]; 40 41 postConfigure = '' 42 substituteInPlace setup.py \ 43 --replace "/usr/include/eigen3/" "${eigen}/include/eigen3/" 44 ''; 45 46 preBuild = '' 47 export HOME=$(mktemp -d) 48 ''; 49 50 # performance tests aren't useful to us and disabling them allows us to 51 # decouple ourselves from an unnecessary build dep 52 preCheck = '' 53 for f in test/test*.py ; do 54 substituteInPlace $f --replace 'import perfplot' "" 55 done 56 ''; 57 disabledTests = [ "test_speed_comparison1" "test_speed_comparison2" ]; 58 pythonImportsCheck = [ "accupy" ]; 59 60 meta = with lib; { 61 description = "Accurate sums and dot products for Python"; 62 homepage = "https://github.com/nschloe/accupy"; 63 license = licenses.mit; 64 maintainers = [ maintainers.costrouc ]; 65 }; 66}