summary refs log tree commit diff
path: root/pkgs/development/python-modules/pysparse/default.nix
blob: 5c3a6bb26f86eedce7d0545ea7c22913587d8abf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, setuptools
, liblapack
, isPy27
, python
}:

buildPythonPackage {
  pname = "pysparse";
  version = "1.3-dev";
  disabled = !isPy27;

  src = fetchFromGitHub {
    owner = "PythonOptimizers";
    repo = "pysparse";
    rev = "f8430bd99ac2a6209c462657c5792d10033888cc";
    sha256 = "19xcq8214yndra1xjhna3qjm32wprsqck97dlnw3xcww7rfy6hqh";
  };

  hardeningDisable = [ "all" ];

  propagatedBuildInputs = [
    numpy
    numpy.blas
    liblapack
  ];

  # Include patches from working version of PySparse 1.3-dev in
  # Conda-Forge,
  # https://github.com/conda-forge/pysparse-feedstock/tree/b69266911a2/recipe
  # Thanks to https://github.com/guyer
  patches = [ ./dropPackageLoader.patch ];

  checkPhase = ''
    cd test
    ${python.interpreter} -c "import pysparse"
    ${python.interpreter} test_sparray.py
  '';

  meta = with lib; {
    homepage = https://github.com/PythonOptimizers/pysparse;
    description = "A Sparse Matrix Library for Python";
    license = licenses.bsd3;
    maintainers = with maintainers; [ costrouc ];
  };
}