Skip to content

Commit ef3f3ed

Browse files
committed
build: avoid private MLX path state
1 parent fbf7823 commit ef3f3ed

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
from pathlib import Path
34

45
from setuptools import setup
56

@@ -15,7 +16,7 @@ def build_extension(self, ext: extension.CMakeExtension) -> None:
1516
build_contract_args = (
1617
f"-DPython_EXECUTABLE={sys.executable}",
1718
f"-Dnanobind_DIR={nanobind.cmake_dir()}",
18-
f"-DMLX_ROOT={extension._MLX_PATH}",
19+
f"-DMLX_ROOT={Path(extension.__file__).resolve().parent}",
1920
)
2021
os.environ["CMAKE_ARGS"] = " ".join(
2122
part for part in (previous_args, *build_contract_args) if part

0 commit comments

Comments
 (0)