From 37285a8603b5fc21e4060c64127c94555054f103 Mon Sep 17 00:00:00 2001 From: Ruihang Lai Date: Thu, 28 Aug 2025 16:42:00 -0400 Subject: [PATCH] [Python] Update version.py to bump pyproject.toml automatically This PR updates the `version.py`, so every time when running this file, it also bumps the version number in `pyproject.toml` automatically. --- version.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/version.py b/version.py index cf37e645c4a2..4bd37c500c02 100644 --- a/version.py +++ b/version.py @@ -21,6 +21,7 @@ List of affected files: - tvm-root/python/tvm/libinfo.py +- tvm-root/pyproject.toml - tvm-root/include/tvm/runtime/base.h - tvm-root/conda/recipe/meta.yaml - tvm-root/web/package.json @@ -175,6 +176,13 @@ def sync_version(pub_ver, local_ver, dry_run): local_ver, dry_run, ) + # pyproject.toml + update( + os.path.join(PROJ_ROOT, "pyproject.toml"), + r"(?<=version = \")[.0-9a-z\+]+", + pub_ver, + dry_run, + ) # Use public version for other parts for now # Note that full git hash is already available in libtvm # C++ header