diff --git a/pyproject.toml b/pyproject.toml
index 30070e28b31b9db50ff186eaec495199edf48c7f..5812327e595103624cccfe7e84433e62304ed7e2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -62,10 +62,8 @@
         "pytest",
         "pytest-cov",
         "coverage",
-        # dev-profile constraints will set the extras of tensorflow and
-        # tensorflow-macos according to the current OS. Leave both deps in here:
-        "tensorflow",
-        "tensorflow-macos",
+        "tensorflow; sys_platform != 'darwin'",
+        "tensorflow-macos; sys_platform == 'darwin'",
         ]
 
 [tool.setuptools]