mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-18 01:50:16 +08:00
27
python/mlx/__main__.py
Normal file
27
python/mlx/__main__.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import argparse
|
||||
|
||||
|
||||
def main() -> None:
|
||||
from mlx.core import __version__
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"--version",
|
||||
action="version",
|
||||
version=__version__,
|
||||
help="Print the version number.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--cmake-dir",
|
||||
action="store_true",
|
||||
help="Print the path to the MLX CMake module directory.",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
if args.cmake_dir:
|
||||
from pathlib import Path
|
||||
|
||||
print(Path(__file__).parent)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Reference in New Issue
Block a user