Unverified Commit 4a65ac39 authored by natsukium's avatar natsukium
Browse files

python310Packages.sklearn-deap: refactor

- add format
- add unittestCheckHook to nativeCheckInputs
- enable pythonImportsCheck
- change the license to MIT from LGPL3
parent 69953bf9
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, numpy, scipy, deap, scikit-learn, python }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, deap
, numpy
, scikit-learn
, scipy
, unittestCheckHook
}:

buildPythonPackage rec {
  pname = "sklearn-deap";
  version = "0.3.0";
  format = "setuptools";

  # No tests in Pypi
  src = fetchFromGitHub {
    owner = "rsteca";
    repo = pname;
    repo = "sklearn-deap";
    rev = version;
    hash = "sha256-bXBHlv1pIOyDLKCBeffyHaTZ7gNiZNl0soa73e8E4/M=";
  };
@@ -26,14 +36,16 @@ buildPythonPackage rec {

  propagatedBuildInputs = [ numpy scipy deap scikit-learn ];

  checkPhase = ''
    ${python.interpreter} test.py
  '';
  nativeCheckInputs = [
    unittestCheckHook
  ];

  pythonImportsCheck = [ "evolutionary_search" ];

  meta = with lib; {
    description = "Use evolutionary algorithms instead of gridsearch in scikit-learn";
    homepage = "https://github.com/rsteca/sklearn-deap";
    license = licenses.lgpl3;
    license = licenses.mit;
    maintainers = with maintainers; [ psyanticy ];
  };
}