<commit_before>{ lib
, buildPythonPackage
, fetchFromGitHub
, nose
, numpy
, pythonOlder
, scipy
}:

buildPythonPackage rec {
  pname = "ecos";
  version = "2.0.10";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "embotech";
    repo = "ecos-python";
    rev = "v${version}";
    sha256 = "sha256-TPxrTyVZ1KXgPoDbZZqXT5+NEIEndg9qepujqFQwK+Q=";
    fetchSubmodules = true;
  };

  propagatedBuildInputs = [
    numpy
    scipy
  ];

  checkInputs = [
    nose
  ];

  checkPhase = ''
    cd ./src
    nosetests test_interface.py test_interface_bb.py
  '';

  pythonImportsCheck = [
    "ecos"
  ];

  meta = with lib; {
    description = "Python package for ECOS: Embedded Cone Solver";
    homepage = "https://github.com/embotech/ecos-python";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ drewrisinger ];
  };<commit_msg>python3Packages.ecos: fix test_interface_bb.py tests<commit_after>{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, nose
, numpy
, pythonOlder
, scipy
}:

buildPythonPackage rec {
  pname = "ecos";
  version = "2.0.10";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "embotech";
    repo = "ecos-python";
    rev = "v${version}";
    sha256 = "sha256-TPxrTyVZ1KXgPoDbZZqXT5+NEIEndg9qepujqFQwK+Q=";
    fetchSubmodules = true;
  };

  patches = [
    # Fix for test_interface_bb.py tests
    (fetchpatch {
      name = "test_interface_bb_use_nparray.patch";
      url = "https://github.com/embotech/ecos-python/commit/4440dcb7ddbd92217bc83d8916b72b61537dffbf.patch";
      hash = "sha256-pcTPviK916jzCLllRhopbC9wDHv+aS6GmV/92sUwzHc=";
    })
  ];

  propagatedBuildInputs = [
    numpy
    scipy
  ];

  checkInputs = [
    nose
  ];

  checkPhase = ''
    cd ./src
    nosetests test_interface.py test_interface_bb.py
  '';

  pythonImportsCheck = [
    "ecos"
  ];

  meta = with lib; {
    description = "Python package for ECOS: Embedded Cone Solver";
    homepage = "https://github.com/embotech/ecos-python";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ drewrisinger ];
  };
{'fraction_non_alphanumeric': 0.12540490513651087, 'fraction_numerical': 0.03054141601110597, 'mean_word_length': 3.1980582524271846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3427277', 'n_tokens_mistral': 882, 'n_tokens_neox': 829, 'n_words': 142}