Commit 41c605d3 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.watchdog-gevent: refactor

parent 35092bf1
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -3,30 +3,35 @@
, fetchFromGitHub
, gevent
, pytestCheckHook
, setuptools
, pythonOlder
, watchdog
}:

buildPythonPackage rec {
  pname = "watchdog-gevent";
  version = "0.1.1";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";

  # Need to fetch from github because tests are not present in pypi
  src = fetchFromGitHub {
    owner = "Bogdanp";
    repo = "watchdog_gevent";
    rev = "v${version}";
    rev = "refs/tags/v${version}";
    hash = "sha256-FESm3fNuLmOg2ilI/x8U9LuAimHLnahcTHYzW/nzOVY=";
  };

  propagatedBuildInputs = [ watchdog gevent ];

  postPatch = ''
    sed -i setup.cfg \
      -e 's:--cov watchdog_gevent::' \
      -e 's:--cov-report html::'
  '';

  build-system = [ setuptools ];

  dependencies = [ gevent watchdog ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "watchdog_gevent" ];