From 5f0a60f85694f406b76a468fc18bc54732bc8547 Mon Sep 17 00:00:00 2001 From: Reno Dakota <170618376+paparodeo@users.noreply.github.com> Date: Sat, 26 Oct 2024 04:50:41 +0000 Subject: [PATCH] python312Packages.watchdog: fix x64 darwin drop sdk 10.12 patch that no longer applies and use sdk 11 --- .../python-modules/watchdog/default.nix | 12 ++++----- .../watchdog/force-kqueue.patch | 26 ------------------- pkgs/top-level/python-packages.nix | 4 +-- 3 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 pkgs/development/python-modules/watchdog/force-kqueue.patch diff --git a/pkgs/development/python-modules/watchdog/default.nix b/pkgs/development/python-modules/watchdog/default.nix index dd17bcefa39f8..82c4d8051c43e 100644 --- a/pkgs/development/python-modules/watchdog/default.nix +++ b/pkgs/development/python-modules/watchdog/default.nix @@ -2,7 +2,6 @@ lib, stdenv, buildPythonPackage, - CoreServices, eventlet, fetchPypi, flaky, @@ -11,6 +10,8 @@ pytestCheckHook, pythonOlder, pyyaml, + apple-sdk, + apple-sdk_11, }: buildPythonPackage rec { @@ -25,14 +26,11 @@ buildPythonPackage rec { hash = "sha256-tN+7bEkiG+RTViPqRHSk1u4KnO9KgLIMKNtNhYtk4nA="; }; - # force kqueue on x86_64-darwin, because our api version does - # not support fsevents - patches = lib.optionals (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64) [ - ./force-kqueue.patch + buildInputs = lib.optionals (stdenv.hostPlatform.isDarwin + && lib.versionOlder apple-sdk.version "11") [ + apple-sdk_11 ]; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; - optional-dependencies.watchmedo = [ pyyaml ]; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/watchdog/force-kqueue.patch b/pkgs/development/python-modules/watchdog/force-kqueue.patch deleted file mode 100644 index d4a0f4e6a00ee..0000000000000 --- a/pkgs/development/python-modules/watchdog/force-kqueue.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/setup.py b/setup.py -index 337e4be..55ef9a6 100644 ---- a/setup.py -+++ b/setup.py -@@ -38,7 +38,7 @@ _apple_devices = ("appletv", "iphone", "ipod", "ipad", "watch") - is_macos = sys.platform == "darwin" and not machine().lower().startswith(_apple_devices) - - ext_modules = [] --if is_macos or os.getenv("FORCE_MACOS_MACHINE", "0") == "1": -+if False: - ext_modules = [ - Extension( - name="_watchdog_fsevents", -diff --git a/tests/utils.py b/tests/utils.py -index 00dcf40..9fbc42a 100644 ---- a/tests/utils.py -+++ b/tests/utils.py -@@ -15,8 +15,6 @@ Emitter: Type[EventEmitter] - if sys.platform.startswith("linux"): - from watchdog.observers.inotify import InotifyEmitter as Emitter - from watchdog.observers.inotify import InotifyFullEmitter --elif sys.platform.startswith("darwin"): -- from watchdog.observers.fsevents import FSEventsEmitter as Emitter - elif sys.platform.startswith("win"): - from watchdog.observers.read_directory_changes import WindowsApiEmitter as Emitter - elif sys.platform.startswith(("dragonfly", "freebsd", "netbsd", "openbsd", "bsd")): diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 96d7f210d0b95..ccdd1a1ca30ec 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17406,9 +17406,7 @@ self: super: with self; { wat = callPackage ../development/python-modules/wat { }; - watchdog = callPackage ../development/python-modules/watchdog { - inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices; - }; + watchdog = callPackage ../development/python-modules/watchdog { }; watchdog-gevent = callPackage ../development/python-modules/watchdog-gevent { };