From 6da5c1ef793d4a4d46241983bb5db11ea92ae9ae Mon Sep 17 00:00:00 2001 From: Kevin Guillaumond Date: Sat, 21 Sep 2024 15:16:58 -0700 Subject: [PATCH] Remove liblarch dependency I think it has been unused since the move to GTK4. Tested by creating and running the flatpak. --- .github/workflows/unit_tests.yml | 1 - GTG/core/system_info.py | 1 - GTG/gtk/browser/main_window.py | 6 ++---- GTG/gtk/tag_completion.py | 11 ++--------- README.md | 10 ---------- build-aux/python3-requirements.yaml | 9 --------- build-aux/requirements.txt | 1 - snap/snapcraft.yaml | 1 - 8 files changed, 4 insertions(+), 36 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 884a18539..0ddc17ae7 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -33,7 +33,6 @@ jobs: python -m pip install --upgrade pip sudo apt-get update sudo apt install -y meson gettext itstool libgirepository1.0-dev gir1.2-gtk-4.0 libgtksourceview-5-dev libportal-dev - pip install --user -e git+https://github.com/getting-things-gnome/liblarch.git#egg=liblarch pip install --user pytest pycairo PyGObject caldav lxml - name: Build and install GTG diff --git a/GTG/core/system_info.py b/GTG/core/system_info.py index ac178d37c..09c6f56f6 100644 --- a/GTG/core/system_info.py +++ b/GTG/core/system_info.py @@ -48,7 +48,6 @@ def get_system_info(self, report: bool = False) -> str: sys_info += "\n" sys_info += self.__format_info("lxml", self.__get_python_module("lxml")) sys_info += self.__format_info("caldav", self.__get_python_module("caldav")) - sys_info += self.__format_info("liblarch", self.__get_python_module("liblarch")) sys_info += self.__format_info("Cheetah3", self.__get_python_module("Cheetah")) sys_info += self.__format_info("dbus-python", self.__get_python_module("dbus")) sys_info += self.__format_info("pdflatex", self.__get_python_module("pdflatex")) diff --git a/GTG/gtk/browser/main_window.py b/GTG/gtk/browser/main_window.py index eb2c2aa2b..b37f4e3a0 100644 --- a/GTG/gtk/browser/main_window.py +++ b/GTG/gtk/browser/main_window.py @@ -568,7 +568,7 @@ def restore_collapsed_tasks(self, tasks=None): try: self.vtree_panes['active'].collapse_node(path) except IndexError: - print(f"Invalid liblarch path {path}") + print(f"Invalid path {path}") def restore_tag_selection(self) -> None: @@ -792,9 +792,7 @@ def on_task_expanded(self, sender, path: str): self.config.set("collapsed_tasks", collapsed_tasks) # restore expanded state of subnodes - # liblarch already has basic tracking of collapsed nodes and expanding - # them necessary, but we still need to do it ourselves for subnodes - model: liblarch_gtk.treemodel.TreeModel = sender.get_model() + model = sender.get_model() for child_id in model.tree.node_all_children(tid): child_path = path + (child_id,) if str(child_path) not in collapsed_tasks: diff --git a/GTG/gtk/tag_completion.py b/GTG/gtk/tag_completion.py index f9ee28cfb..b099615d3 100644 --- a/GTG/gtk/tag_completion.py +++ b/GTG/gtk/tag_completion.py @@ -16,8 +16,6 @@ # this program. If not, see . # ----------------------------------------------------------------------------- -""" Tag completion which is connected to LibLarch """ - from gi.repository import Gtk import unicodedata @@ -59,15 +57,10 @@ class TagCompletion(Gtk.EntryCompletion): ['@tag', '!@tag', 'tag', '!tag'] The user can choose wheter write tag with or without '@', - with or without '!' which is used for negation. - - The list of tasks is updated by LibLarch callbacks """ + with or without '!' which is used for negation.""" def __init__(self, tagstore): - """ Initialize entry completion - - Create a list store which is connected to a LibLarch and - kept updated. """ + """ Initialize entry completion""" super().__init__() self.tags = Gtk.ListStore(str) diff --git a/README.md b/README.md index d59cb462d..154c3147f 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ git pull --rebase * python-caldav * pycairo * pygobject (>= 3.20) -* libLarch (>= 3.2) * lxml * itstool * gettext @@ -67,15 +66,6 @@ echo 'deb http://deb.debian.org/debian buster-backports main' | sudo tee -a /etc sudo apt install meson python3-gi-cairo python3-gi gir1.2-pango-1.0 gir1.2-gdkpixbuf-2.0 gir1.2-gtk-3.0 itstool gettext python3-lxml libgirepository1.0-dev libsecret-1.0 gir1.2-secret-1 ``` -liblarch may be harder to come by until distributions package the python3 version of it, alongside GTG 0.6+ itself. -You can get it in the meanwhile via PIP (commonly provided by `python3-pip` package): - -```sh -pip3 install --user -e git+https://github.com/getting-things-gnome/liblarch.git#egg=liblarch -``` - -Alternatively, if you had checked out a specific version of liblarch that you want to test, in a parent folder for example (`../liblarch`), you could do: `pip3 install --user ../liblarch/` (you can later remove that with `pip3 uninstall liblarch` if you need to). - #### Optional Dependencies * [setproctitle](https://pypi.org/project/setproctitle/) diff --git a/build-aux/python3-requirements.yaml b/build-aux/python3-requirements.yaml index e0d669bd0..098f52341 100644 --- a/build-aux/python3-requirements.yaml +++ b/build-aux/python3-requirements.yaml @@ -2,15 +2,6 @@ build-commands: [] buildsystem: simple modules: - - name: python3-liblarch - buildsystem: simple - build-commands: - - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" - --prefix=${FLATPAK_DEST} "." --no-build-isolation - sources: - - type: git - url: https://github.com/getting-things-gnome/liblarch.git - commit: null - name: python3-lxml buildsystem: simple build-commands: diff --git a/build-aux/requirements.txt b/build-aux/requirements.txt index 23a36f9b6..80e5ac292 100644 --- a/build-aux/requirements.txt +++ b/build-aux/requirements.txt @@ -1,6 +1,5 @@ lxml==5.1.0 caldav==1.3.9 -git+https://github.com/getting-things-gnome/liblarch.git#egg=liblarch pytest Cheetah3 dbus-python==1.2.18 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e5b07d5ca..56befa1ba 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -48,7 +48,6 @@ parts: - python-deps python-deps: - source: https://github.com/getting-things-gnome/liblarch.git plugin: python build-packages: - python3-dbus