Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / pysparse / default.nix
blobfda5ad596088c8ccb68bc067170f9ed58ca53e21
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , numpy
5 , setuptools
6 , blas
7 , lapack
8 , isPy27
9 , python
12 buildPythonPackage {
13   pname = "pysparse";
14   version = "1.3-dev";
15   disabled = !isPy27;
17   src = fetchFromGitHub {
18     owner = "PythonOptimizers";
19     repo = "pysparse";
20     rev = "f8430bd99ac2a6209c462657c5792d10033888cc";
21     sha256 = "19xcq8214yndra1xjhna3qjm32wprsqck97dlnw3xcww7rfy6hqh";
22   };
24   hardeningDisable = [ "all" ];
26   propagatedBuildInputs = [
27     numpy
28     blas
29     lapack
30   ];
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 ];
38   checkPhase = ''
39     cd test
40     ${python.interpreter} -c "import pysparse"
41     ${python.interpreter} test_sparray.py
42   '';
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   };