diff --git a/pyproject.toml b/pyproject.toml
index d966f231bedfd31601ab87539604f15c52f1eb4c..d2dd6b58966403f24b08fdbfdbabdb5bf88411d1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -65,10 +65,8 @@
         "pytest-cov",
         "coverage",
         "dask",
-        # 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]