File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 44
55#define MLX_VERSION_MAJOR 0
66#define MLX_VERSION_MINOR 24
7- #define MLX_VERSION_PATCH 0
7+ #define MLX_VERSION_PATCH 1
88#define MLX_VERSION_NUMERIC \
99 (100000 * MLX_VERSION_MAJOR + 1000 * MLX_VERSION_MINOR + MLX_VERSION_PATCH)
1010
Original file line number Diff line number Diff line change 1212from setuptools .command .build_ext import build_ext
1313
1414
15- def get_version (version ):
15+ def get_version ():
16+ with open ("mlx/version.h" , "r" ) as fid :
17+ for l in fid :
18+ if "#define MLX_VERSION_MAJOR" in l :
19+ major = l .split ()[- 1 ]
20+ if "#define MLX_VERSION_MINOR" in l :
21+ minor = l .split ()[- 1 ]
22+ if "#define MLX_VERSION_PATCH" in l :
23+ patch = l .split ()[- 1 ]
24+ version = f"{ major } .{ minor } .{ patch } "
1625 if "PYPI_RELEASE" not in os .environ :
1726 today = datetime .date .today ()
1827 version = f"{ version } .dev{ today .year } { today .month :02d} { today .day :02d} "
@@ -172,7 +181,7 @@ def run(self) -> None:
172181
173182 setup (
174183 name = "mlx" ,
175- version = get_version ("0.24.0" ),
184+ version = get_version (),
176185 author = "MLX Contributors" ,
177186178187 description = "A framework for machine learning on Apple silicon." ,
You can’t perform that action at this time.
0 commit comments