about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-05-01 08:50:53 +0200
committerGitHub <noreply@github.com>2024-05-01 08:50:53 +0200
commit32fbfcef73d3233013dd7944748d4005aa7c969c (patch)
tree2bf386018bc29c1fd302a6b07e5a4d754fd47409 /pkgs
parentb5ad7a05ae7cd0c7f2edd2540a07021a5eceeb78 (diff)
parent12a842cafd77064869e81f9a6ba6fbf6a559bbf1 (diff)
Merge pull request #307714 from fabaff/watchdog-gevent-fix
python312Packages.watchdog-gevent: disable tests
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/watchdog-gevent/default.nix39
1 files changed, 29 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/watchdog-gevent/default.nix b/pkgs/development/python-modules/watchdog-gevent/default.nix
index e1b812b9612f1..fb5951a38ce4d 100644
--- a/pkgs/development/python-modules/watchdog-gevent/default.nix
+++ b/pkgs/development/python-modules/watchdog-gevent/default.nix
@@ -1,25 +1,37 @@
-{ lib
-, buildPythonPackage
-, fetchFromGitHub
-, gevent
-, pytestCheckHook
-, watchdog
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  fetchpatch,
+  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 ];
+  patches = [
+    # Add new event_filter argument to GeventEmitter
+    (fetchpatch {
+      name = "new-event_filter-argument.patch";
+      url = "https://github.com/Bogdanp/watchdog_gevent/commit/a98b6599aefb6f1ea6f9682485ed460c52f6e55f.patch";
+      hash = "sha256-lbUtl8IbnJjlsIpbC+wXLvYB+ZtUuHWqFtf31Bfqc2I=";
+    })
+  ];
 
   postPatch = ''
     sed -i setup.cfg \
@@ -27,6 +39,13 @@ buildPythonPackage rec {
       -e 's:--cov-report html::'
   '';
 
+  build-system = [ setuptools ];
+
+  dependencies = [
+    gevent
+    watchdog
+  ];
+
   nativeCheckInputs = [ pytestCheckHook ];
 
   pythonImportsCheck = [ "watchdog_gevent" ];