@@ -2,4 +2,12 @@
python3 -m venv .venv
source .venv/bin/activate
-pip install -e .
+
+# Check if running on macOS with Apple Silicon
+if [[ "$(uname)" == "Darwin" && "$(uname -m)" == "arm64" ]]; then
+ echo "Installing with Apple Silicon support..."
+ pip install -e ".[apple_silicon]"
+else
+ echo "Installing without Apple Silicon support..."
+ pip install -e .
+fi
@@ -27,13 +27,6 @@ install_requires = [
"tinygrad @ git+https://github.com/tinygrad/tinygrad.git@232edcfd4f8b388807c64fb1817a7668ce27cbad",
]
-# Add macOS-specific packages if on Darwin (macOS)
-if sys.platform.startswith("darwin"):
- install_requires.extend([
- "mlx==0.18.0",
- "mlx-lm==0.18.2",
- ])
-
extras_require = {
"linting": [
"pylint==3.2.6",
@@ -41,6 +34,10 @@ extras_require = {
"mypy==1.11.0",
"yapf==0.40.2",
],
+ "apple_silicon": [
+ "mlx==0.18.0",
+ "mlx-lm==0.18.2",
+ ],
}
setup(