From 3366d05a5dae8eb147b16544f6ef5e45eea2db07 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Sun, 17 Dec 2023 01:20:50 +0100 Subject: [PATCH 1/2] fix(build): avoid dynamic metadata --- gameplan/__init__.py | 7 ++++--- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gameplan/__init__.py b/gameplan/__init__.py index 7fe488d5..b79009c5 100644 --- a/gameplan/__init__.py +++ b/gameplan/__init__.py @@ -1,6 +1,7 @@ - +import importlib.metadata import frappe -__version__ = '0.0.1' + +__version__ = importlib.metadata.version(__name__) def is_guest(): if frappe.session.user == 'Administrator': @@ -16,4 +17,4 @@ def refetch_resource(cache_key: str | list, user=None): {'cache_key': cache_key}, user=user or frappe.session.user, after_commit=True - ) \ No newline at end of file + ) diff --git a/pyproject.toml b/pyproject.toml index 468798ad..5665648d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = [ description = "Team discussion and collaboration tool" requires-python = ">=3.10" readme = "README.md" -dynamic = ["version"] +version = "0.0.1" dependencies = [ "rembg==2.0.49", ] From 47625c3a63cadbbecca43ee7797ccb1b8a8e7461 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Sun, 17 Dec 2023 01:23:17 +0100 Subject: [PATCH 2/2] fix: add bench backwards compat --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..e8ec6893 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[metadata] +# compatibility until https://github.com/frappe/bench/pull/1502 is more adopted +version = 0.0.1