Package Details: goobook 3.5.2-3

Git Clone URL: (read-only, click to copy)
Package Base: goobook
Description: Access your Google contacts from the command line
Upstream URL:
Licenses: GPL3
Submitter: jaantoots
Maintainer: ribbons
Last Packager: ribbons
Votes: 3
Popularity: 0.006801
First Submitted: 2020-11-08 17:10 (UTC)
Last Updated: 2023-02-21 17:24 (UTC)

Latest Comments

1 2 Next › Last »

ribbons commented on 2023-02-14 18:54 (UTC) (edited on 2023-02-21 17:25 (UTC) by ribbons)

Cheers for the heads-up @sinisterstuf - I've pushed an update adding the missing dependency on python-setuptools

Sorry if I'm being dense but I don't have a package called python-pyparse installed or seem to be able to find it as a package or in the AUR, are you able to clarify?

Edit: Figured it out that the missing dependency was python-pyparsing so have pushed another update to add that.

sinisterstuf commented on 2023-02-14 13:51 (UTC)

Tried this on a fresh install and it crashes unless I install the following 2 packages that most people who use Python probably already have installed: python-pyparse, python-setuptools.

MarsSeed commented on 2022-07-16 17:57 (UTC)

3.5.2 got released, and it depends on python-pyxdg instead of python-xdg.

snakeroot commented on 2021-07-27 21:39 (UTC)

A few months ago, Jan Baier submitted a pull request upstream to make the switch from xdg to pyxdg.

Unfortunately, to date it hasn't been merged. I made patches for the two operative files, and goobook/


---    2021-07-18 15:32:03.973529351 -0400
+++        2021-07-27 17:02:26.627825390 -0400
@@ -39,7 +39,7 @@
-        'xdg>=4.0.1'
+        'pyxdg>=0.26'    


--- goobook/   2021-07-18 16:18:37.199555608 -0400
+++   2021-07-27 09:50:24.618527368 -0400
@@ -10,7 +10,7 @@
 import logging

 import oauth2client.client
-import xdg
+from xdg import BaseDirectory

 from import Storage

@@ -61,8 +61,8 @@
     if config_file:  # config file explicitly given on the commandline
         config_file = os.path.expanduser(config_file)
     else:  # search for goobookrc in XDG dirs and homedir
-        config_files = [dir_ / "goobookrc" for dir_ in [xdg.XDG_CONFIG_HOME] +
-                        xdg.XDG_CONFIG_DIRS] + [LEGACY_CONFIG_FILE]
+        config_files = [dir_ / "goobookrc" for dir_ in [pathlib.Path(BaseDirectory.xdg_config_home)] +
+                        [pathlib.Path(p) for p in BaseDirectory.xdg_config_dirs]] + [LEGACY_CONFIG_FILE]
         log.debug("config file search path: %s", config_files)
         for config_file_ in config_files:
             if config_file_.exists():
@@ -93,7 +93,7 @@
     if config.cache_filename:  # If explicitly specified in config file
         config.cache_filename = realpath(expanduser(config.cache_filename))
     else:  # search for goobook_cache in XDG dirs and homedir
-        cache_files = [xdg.XDG_CACHE_HOME / "goobook_cache", LEGACY_CACHE_FILE]
+        cache_files = [pathlib.Path(BaseDirectory.xdg_cache_home) / "goobook_cache", LEGACY_CACHE_FILE]
         log.debug("cache file search path: %s", cache_files)
         for cache_file in cache_files:
             cache_file = cache_file.resolve()
@@ -101,7 +101,7 @@
                 log.debug("found cache file: %s", cache_file)
         else:  # If there is none, create in XDG_CACHE_HOME
-            cache_file = xdg.XDG_CACHE_HOME / "goobook_cache"
+            cache_file = pathlib.Path(BaseDirectory.xdg_cache_home) / "goobook_cache"
             log.debug("no cache file found, will use %s", cache_file)
         config.cache_filename = str(cache_file)

@@ -110,8 +110,8 @@
         config.oauth_db_filename = realpath(expanduser(config.oauth_db_filename))
         auth_file = pathlib.Path(config.oauth_db_filename)
     else:  # search for goobook_auth.json in XDG dirs and homedir
-        auth_files = [dir_ / "goobook_auth.json" for dir_ in [xdg.XDG_DATA_HOME] +
-                      xdg.XDG_DATA_DIRS] + [LEGACY_AUTH_FILE]
+        auth_files = [dir_ / "goobook_auth.json" for dir_ in [pathlib.Path(BaseDirectory.xdg_data_home)] +
+                      [pathlib.Path(p) for p in BaseDirectory.xdg_data_dirs]] + [LEGACY_AUTH_FILE]
         log.debug("auth file search path: %s", auth_files)
         for auth_file in auth_files:
             auth_file = auth_file.resolve()
@@ -119,7 +119,7 @@
                 log.debug("found auth file: %s", auth_file)
         else:  # If there is none, create in XDG_DATA_HOME
-            auth_file = xdg.XDG_DATA_HOME / "goobook_auth.json"
+            auth_file = pathlib.Path(BaseDirectory.xdg_data_home) / "goobook_auth.json"
             log.debug("no auth file found, will use %s", auth_file)
         config.oauth_db_filename = str(auth_file)

Add these patches to the same directory as the PKGBUILD, change the depends from python-xdg to python-pyxdg, add the patches to the source array, add 'SKIP' for both in the SHA256 array and add the following "prepare" stanza above the "build":

prepare() {
    cd "$pkgname-$pkgver"
    patch --input="${srcdir}/setup.patch"
    patch -d goobook --input="${srcdir}/config.patch"

This compiles and seems to work (i.e., I can query contacts).

smp commented on 2021-02-20 07:36 (UTC)

It has turned out that my work-around of installing goobook using PIP doesn't actually let me use it alongside packages that depend on python-pyxdg. However the comments of python-xdg link to a forum thread that describes how to work around the problem using Python virtual environments.

afwlehmann commented on 2021-02-15 08:20 (UTC)

@ribbons @smp Thanks for the info. For some reason I could not simply install the AUR package for python-xdg (I'm using aura), but had to clone the repo and makepkg the thing manually instead. Anyway, goobook seems to be working now so thanks for the heads-up!

smp commented on 2021-02-14 12:58 (UTC) (edited on 2021-02-14 12:59 (UTC) by smp)

The problem is that many packages from the repositories and the AUR depend on python-pyxdg from the repositories and will not work with python-xdg from the AUR (python-pyxdg and python-xdg conflict because they have the same module names). It seems to me that the only way to resolve this would be for the developer of python-xdg to rename their package, as has been requested here. I have meanwhile opted for a work-around in the form of installing goobook via PIP.

ribbons commented on 2021-02-14 11:15 (UTC)

@afwlehmann the latest version of this package works fine for me with python-xdg version 5.0.1-2 from the AUR (it depends on 4.0.1 or above).

afwlehmann commented on 2021-02-10 06:51 (UTC)

The latest available version of community/python-xdg dependency is 0.26-8 (and there is no AUR of 4.0.1 as well), so I am having trouble upgrading to the latest version of goobook.