From 4b4f030fe3b1615ad6b23d764adb8f191bcfb2ab Mon Sep 17 00:00:00 2001 From: snowy Date: Sun, 18 Aug 2024 03:31:29 +0800 Subject: [PATCH] =?UTF-8?q?:children=5Fcrossing:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- liteyuki/__init__.py | 26 +++++++++++++++----------- pyproject.toml | 4 ++-- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 1124b9e7..b2c00f66 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,5 @@ prompt.txt # pdm -.pdm-python \ No newline at end of file +.pdm-python +dist \ No newline at end of file diff --git a/liteyuki/__init__.py b/liteyuki/__init__.py index 2ff0eee6..b6fa9b4c 100644 --- a/liteyuki/__init__.py +++ b/liteyuki/__init__.py @@ -1,3 +1,5 @@ +from git import Repo + from liteyuki.bot import ( LiteyukiBot, get_bot, @@ -21,14 +23,16 @@ from liteyuki.log import ( ) __all__ = [ - "LiteyukiBot", - "get_bot", - "get_config", - "get_config_with_compat", - "Channel", - "Event", - "load_plugin", - "load_plugins", - "init_log", - "logger" -] \ No newline at end of file + "LiteyukiBot", + "get_bot", + "get_config", + "get_config_with_compat", + "Channel", + "Event", + "load_plugin", + "load_plugins", + "init_log", + "logger" +] + +__version__ = f"6.3.5+g{Repo('.').head.commit.hexsha}" diff --git a/pyproject.toml b/pyproject.toml index c4ad74b3..7ebdd8db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ # 此文件仅供 liteyuki 框架使用,请勿用于应用程序及nb-cli,请使用pip进行安装。 [project] name = "liteyukibot" -version = "6.3.2" +dynamic = ["version"] description = "A lightweight bot process management framework and application." readme = "README.md" requires-python = ">=3.10" @@ -33,4 +33,4 @@ requires = ["pdm-backend"] build-backend = "pdm.backend" [tool.pdm] -includes = ["liteyuki"] +packages = ["liteyuki"] \ No newline at end of file