python312Packages.watchdog: fix x64 darwin (#351344)

This commit is contained in:
Emily 2024-10-26 13:06:08 +01:00 committed by GitHub
commit 664ea60d3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 37 deletions

View File

@ -2,7 +2,6 @@
lib,
stdenv,
buildPythonPackage,
CoreServices,
eventlet,
fetchPypi,
flaky,
@ -11,6 +10,7 @@
pytestCheckHook,
pythonOlder,
pyyaml,
apple-sdk_11,
}:
buildPythonPackage rec {
@ -25,13 +25,7 @@ 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 [ CoreServices ];
buildInputs = lib.optional stdenv.hostPlatform.isDarwin apple-sdk_11;
optional-dependencies.watchmedo = [ pyyaml ];

View File

@ -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")):

View File

@ -17410,9 +17410,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 { };