[packages/etm-dgraham] new

atler atler at pld-linux.org
Thu Jun 22 14:52:37 CEST 2023


commit 0a511c99280a21e50fd78212a493d27aaedb5763
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Jun 22 14:03:00 2023 +0200

    new
    
    - upstream fix for compatibility with tinydb < 4.0.0

 etm-dgraham.spec    | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 tinydb-compat.patch | 31 +++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+)
---
diff --git a/etm-dgraham.spec b/etm-dgraham.spec
new file mode 100644
index 0000000..be6ad8f
--- /dev/null
+++ b/etm-dgraham.spec
@@ -0,0 +1,46 @@
+Summary:	Event and task manager
+Name:		etm-dgraham
+Version:	5.1.4
+Release:	1
+License:	GPL
+Group:		Applications/Text
+Source0:	https://files.pythonhosted.org/packages/source/e/etm-dgraham/%{name}-%{version}.tar.gz
+# Source0-md5:	2b67de9ef007dcbd562b063d67f1220d
+Patch0:		tinydb-compat.patch
+URL:		https://dagraham.github.io/etm-dgraham/
+BuildRequires:	python3 >= 1:3.7.3
+BuildRequires:	python3-modules >= 1:3.7.3
+BuildRequires:	python3-setuptools
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python3-modules >= 1:3.7.3
+Requires:	python3-setuptools
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Terminal based event and task manager with goal to be the Swiss Army
+Knife of tools for managing reminders.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%py3_build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%attr(755,root,root) %{_bindir}/etm
+%attr(755,root,root) %{_bindir}/etm+
+%{py3_sitescriptdir}/etm
+%{py3_sitescriptdir}/etm_dgraham-*-py*.egg-info
diff --git a/tinydb-compat.patch b/tinydb-compat.patch
new file mode 100644
index 0000000..ab5bc39
--- /dev/null
+++ b/tinydb-compat.patch
@@ -0,0 +1,31 @@
+From 54132324878f2d47c134c201fd27206cffcfcfea Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpalus at fastmail.com>
+Date: Thu, 22 Jun 2023 12:58:44 +0200
+Subject: [PATCH] Fix compatibility with tinydb < 4.0.0
+
+tinydb 4.0.0 extracted Document/Table classes from database to table
+module
+---
+ etm/model.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/etm/model.py b/etm/model.py
+index ee8badf..a1479f9 100755
+--- a/etm/model.py
++++ b/etm/model.py
+@@ -41,7 +41,11 @@ import sys
+ import re
+ 
+ from tinydb import __version__ as tinydb_version
+-from tinydb.table import Document
++from packaging.version import parse as parse_version
++if parse_version(tinydb_version) >= parse_version("4.0.0"):
++    from tinydb.table import Document
++else:
++    from tinydb.database import Document
+ 
+ from jinja2 import Template
+ from jinja2 import __version__ as jinja2_version
+-- 
+2.41.0
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/etm-dgraham.git/commitdiff/0a511c99280a21e50fd78212a493d27aaedb5763



More information about the pld-cvs-commit mailing list