1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numpy
5, setuptools
6, blas
7, lapack
8, isPy27
9, python
10}:
11
12buildPythonPackage {
13 pname = "pysparse";
14 version = "1.3-dev";
15 disabled = !isPy27;
16
17 src = fetchFromGitHub {
18 owner = "PythonOptimizers";
19 repo = "pysparse";
20 rev = "f8430bd99ac2a6209c462657c5792d10033888cc";
21 sha256 = "19xcq8214yndra1xjhna3qjm32wprsqck97dlnw3xcww7rfy6hqh";
22 };
23
24 hardeningDisable = [ "all" ];
25
26 propagatedBuildInputs = [
27 numpy
28 blas
29 lapack
30 ];
31
32 # Include patches from working version of PySparse 1.3-dev in
33 # Conda-Forge,
34 # https://github.com/conda-forge/pysparse-feedstock/tree/b69266911a2/recipe
35 # Thanks to https://github.com/guyer
36 patches = [ ./dropPackageLoader.patch ];
37
38 checkPhase = ''
39 cd test
40 ${python.interpreter} -c "import pysparse"
41 ${python.interpreter} test_sparray.py
42 '';
43
44 meta = with lib; {
45 homepage = "https://github.com/PythonOptimizers/pysparse";
46 description = "A Sparse Matrix Library for Python";
47 license = licenses.bsd3;
48 maintainers = with maintainers; [ costrouc ];
49 };
50}