Skip to content

Commit

Permalink
Remove liblarch dependency
Browse files Browse the repository at this point in the history
I think it has been unused since the move to GTK4.

Tested by creating and running the flatpak.
  • Loading branch information
SqAtx authored and diegogangl committed Nov 11, 2024
1 parent 70149ce commit 6da5c1e
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 36 deletions.
1 change: 0 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion GTG/core/system_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
6 changes: 2 additions & 4 deletions GTG/gtk/browser/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
11 changes: 2 additions & 9 deletions GTG/gtk/tag_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
# this program. If not, see <http://www.gnu.org/licenses/>.
# -----------------------------------------------------------------------------

""" Tag completion which is connected to LibLarch """

from gi.repository import Gtk
import unicodedata

Expand Down Expand Up @@ -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)
Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ git pull --rebase
* python-caldav
* pycairo
* pygobject (>= 3.20)
* libLarch (>= 3.2)
* lxml
* itstool
* gettext
Expand All @@ -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/)
Expand Down
9 changes: 0 additions & 9 deletions build-aux/python3-requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion build-aux/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ parts:
- python-deps

python-deps:
source: https://github.com/getting-things-gnome/liblarch.git
plugin: python
build-packages:
- python3-dbus
Expand Down

0 comments on commit 6da5c1e

Please sign in to comment.