From 3a51a5830a1f2a5a31ed976096646c35354b880f Mon Sep 17 00:00:00 2001 From: yan Date: Wed, 8 Jan 2025 16:36:58 +0800 Subject: [PATCH] update --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7b94e6b..57b41d3 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ def get_version(): # 读取文件内容,使用正则找出版本号 with open(init_path, "r", encoding="utf-8") as f: content = f.read() - version_match = re.search(r'^__version__ = ["\']([^"\']*)["\']', content, re.M) + version_match = re.search(r'^__version__ ?= ?["\']([^"\']*)["\']', content, re.M) if version_match: return version_match.group(1) raise RuntimeError("无法在 __init__.py 中找到 __version__ 定义") -- GitLab