Unverified Commit 30ab1697 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

python310Packages.resampy: switch to pytestCheckHook

- add pythonImportsCheck
- remove coverage
- disable on older Python releases
parent 08173c03
Loading
Loading
Loading
Loading
+27 −13
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, cython
, fetchFromGitHub
, pytest
, pytest-cov
, numba
, numpy
, pytestCheckHook
, pythonOlder
, scipy
, cython
, numba
, six
}:

buildPythonPackage rec {
  pname = "resampy";
  version = "0.3.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  # No tests in PyPi Archive
  src = fetchFromGitHub {
    owner = "bmcfee";
    repo = pname;
    rev = "refs/tags/${version}";
    sha256 = "sha256-OVj5dQafIoKeA04yTGBKTinldMjEccxrdiuRFIvRzcE=";
    hash = "sha256-OVj5dQafIoKeA04yTGBKTinldMjEccxrdiuRFIvRzcE=";
  };

  checkInputs = [ pytest pytest-cov ];
  propagatedBuildInputs = [ numpy scipy cython numba six ];
  propagatedBuildInputs = [
    numpy
    cython
    numba
  ];

  checkPhase = ''
    pytest tests
  checkInputs = [
    pytestCheckHook
    scipy
  ];

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace " --cov-report term-missing --cov resampy --cov-report=xml" ""
  '';

  pythonImportsCheck = [
    "resampy"
  ];

  meta = with lib; {
    homepage = "https://github.com/bmcfee/resampy";
    description = "Efficient signal resampling";
    homepage = "https://github.com/bmcfee/resampy";
    license = licenses.isc;
    maintainers = with maintainers; [ ];
  };

}