20 buildPythonPackage rec {
25 disabled = pythonOlder "3.7";
27 src = fetchFromGitHub {
31 hash = "sha256-xxwLmL/rFgDFQNr8mRBFG1/NArQk9wanelL4Lu7ls2s=";
39 buildInputs = [ eigen ];
45 ] ++ lib.optional (pythonOlder "3.8") importlib-metadata;
55 substituteInPlace setup.py \
56 --replace-fail "/usr/include/eigen3/" "${eigen}/include/eigen3/"
60 export HOME=$(mktemp -d)
63 # This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase.
64 # Not sure of the details, but we can avoid it by changing the matplotlib backend during testing.
65 env.MPLBACKEND = lib.optionalString stdenv.hostPlatform.isDarwin "Agg";
67 # performance tests aren't useful to us and disabling them allows us to
68 # decouple ourselves from an unnecessary build dep
70 for f in test/test*.py ; do
71 substituteInPlace $f --replace-quiet 'import perfplot' ""
76 "test_speed_comparison1"
77 "test_speed_comparison2"
80 pythonImportsCheck = [ "accupy" ];
83 description = "Accurate sums and dot products for Python";
84 homepage = "https://github.com/nschloe/accupy";
85 license = licenses.mit;