From aba899cef8c9188f92eb12b173fbe5a7ef62d4aa Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Mon, 24 Mar 2025 12:47:05 -0700 Subject: [PATCH] patch bump (#2000) --- mlx/version.h | 2 +- setup.py | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mlx/version.h b/mlx/version.h index 275c74c73..f05cda798 100644 --- a/mlx/version.h +++ b/mlx/version.h @@ -4,7 +4,7 @@ #define MLX_VERSION_MAJOR 0 #define MLX_VERSION_MINOR 24 -#define MLX_VERSION_PATCH 0 +#define MLX_VERSION_PATCH 1 #define MLX_VERSION_NUMERIC \ (100000 * MLX_VERSION_MAJOR + 1000 * MLX_VERSION_MINOR + MLX_VERSION_PATCH) diff --git a/setup.py b/setup.py index f1769b21f..a1d2c2e6e 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,16 @@ from setuptools import Command, Extension, find_namespace_packages, setup from setuptools.command.build_ext import build_ext -def get_version(version): +def get_version(): + with open("mlx/version.h", "r") as fid: + for l in fid: + if "#define MLX_VERSION_MAJOR" in l: + major = l.split()[-1] + if "#define MLX_VERSION_MINOR" in l: + minor = l.split()[-1] + if "#define MLX_VERSION_PATCH" in l: + patch = l.split()[-1] + version = f"{major}.{minor}.{patch}" if "PYPI_RELEASE" not in os.environ: today = datetime.date.today() version = f"{version}.dev{today.year}{today.month:02d}{today.day:02d}" @@ -172,7 +181,7 @@ if __name__ == "__main__": setup( name="mlx", - version=get_version("0.24.0"), + version=get_version(), author="MLX Contributors", author_email="mlx@group.apple.com", description="A framework for machine learning on Apple silicon.",