From de2917678b0ef6d3c5c16bb1e2ef973aa3d3adba Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 14 Mar 2025 01:04:07 +0800 Subject: chore: update version to 0.1.0 and enhance README with project overview and usage examples --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 58a78cc..b263dfb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3_template" -version = "0.0.1" +version = "0.1.0" edition = "2021" description = "A Pyo3 Project Template For HydroRoll." license = "MIT" -- cgit v1.2.3-70-g09d2 From 7368f06242c8cabc8a813d60e99957ad854865e0 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 14 Mar 2025 01:04:37 +0800 Subject: chore: bump version to 0.2.0 in Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index b263dfb..c82fe05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3_template" -version = "0.1.0" +version = "0.2.0" edition = "2021" description = "A Pyo3 Project Template For HydroRoll." license = "MIT" -- cgit v1.2.3-70-g09d2 From a10578cfd63151739b36f9cc5ba81a4c0eda05ec Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 14 Mar 2025 22:11:18 +0800 Subject: chore: bump version to 0.2.1 in Cargo.toml and __init__.py --- Cargo.toml | 2 +- src/conventionalrp/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index c82fe05..c44b23c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3_template" -version = "0.2.0" +version = "0.2.1" edition = "2021" description = "A Pyo3 Project Template For HydroRoll." license = "MIT" diff --git a/src/conventionalrp/__init__.py b/src/conventionalrp/__init__.py index 9707310..83ed8ce 100644 --- a/src/conventionalrp/__init__.py +++ b/src/conventionalrp/__init__.py @@ -2,4 +2,4 @@ from . import _core from packaging.version import Version -__version__ = Version('0.2.0') +__version__ = Version('0.2.1') -- cgit v1.2.3-70-g09d2 From 9b696f003a2b7da575ea086c6ddc0c579a13f46b Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 14 Mar 2025 22:12:53 +0800 Subject: chore: rename project to conventionalrp and update metadata in Cargo.toml and pyproject.toml --- Cargo.toml | 12 ++++++------ pyproject.toml | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index c44b23c..982bd5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "pyo3_template" +name = "conventionalrp" version = "0.2.1" edition = "2021" -description = "A Pyo3 Project Template For HydroRoll." -license = "MIT" +description = "HydroRoll Conventional Role Play SDK" +license = "AGPLv3.0" documentation = "https://{project}.hydroroll.team/" -homepage = "https://hydroroll.team/" -repository = "https://github.com/HydroRoll-Team/{project}" -authors = ["yourname"] +homepage = "https://crp.hydroroll.team/" +repository = "https://github.com/HydroRoll-Team/conventional_role_play" +authors = ["HsiangNianian"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] diff --git a/pyproject.toml b/pyproject.toml index e8f26b1..71d6eaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,7 @@ authors = [{ name = "HsiangNianian", email = "leader@hydroroll.team" }] dependencies = [] requires-python = ">=3.9" readme.content-type = "text/x-rst" -readme.text = """ -""" +readme.file = "README.rst" license = { text = "AGPLv3.0" } keywords = ["hydroroll"] classifiers = [ -- cgit v1.2.3-70-g09d2 From 1ddf2a5202e065a5df18dfa58a88faa5784a3f8c Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 14 Mar 2025 22:51:17 +0800 Subject: chore: bump version to 0.2.2 and update version retrieval method in __init__.py --- Cargo.toml | 2 +- src/conventionalrp/__init__.py | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 982bd5d..efd1fb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "conventionalrp" -version = "0.2.1" +version = "0.2.2" edition = "2021" description = "HydroRoll Conventional Role Play SDK" license = "AGPLv3.0" diff --git a/src/conventionalrp/__init__.py b/src/conventionalrp/__init__.py index 83ed8ce..bad6a58 100644 --- a/src/conventionalrp/__init__.py +++ b/src/conventionalrp/__init__.py @@ -1,5 +1,16 @@ from . import _core -from packaging.version import Version +__all__ = ["_core", "__version__"] -__version__ = Version('0.2.1') +from importlib.metadata import version +from pkg_resources import get_distribution + +try: + # For Python 3.8+ + __version__ = version("conventionalrp") +except ImportError: + try: + # For Python < 3.8 + __version__ = get_distribution("conventionalrp").version + except Exception: + raise ImportError("Failed to get version") -- cgit v1.2.3-70-g09d2