From 142674279296c8900b1011b72df5d02f39c40d65 Mon Sep 17 00:00:00 2001 From: Zihao Ye Date: Mon, 29 Jan 2024 01:08:53 +0800 Subject: [PATCH] just use version at the moment --- python/setup.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/python/setup.py b/python/setup.py index e79d681e..3ea5e3cf 100644 --- a/python/setup.py +++ b/python/setup.py @@ -27,22 +27,9 @@ root = pathlib.Path(__name__).parent -def get_local_version_suffix() -> str: - now = datetime.datetime.now() - git_hash = subprocess.check_output( - ["git", "rev-parse", "--short", "HEAD"], cwd=root, text=True - ).strip() - commit_number = subprocess.check_output( - ["git", "rev-list", "HEAD", "--count"], cwd=root, text=True - ).strip() - dirty = ".dirty" if subprocess.run(["git", "diff", "--quiet"]).returncode else "" - return f"+c{commit_number}.d{now:%Y%m%d}.{git_hash}{dirty}" - - def get_version(): with open(root / "version.txt") as f: version = f.read().strip() - version += get_local_version_suffix() return version