mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-26 18:51:14 +08:00
28 lines
578 B
Python
28 lines
578 B
Python
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()
|