Package Details: python-pystray 0.19.5-3

Git Clone URL: (read-only, click to copy)
Package Base: python-pystray
Description: Allows to create a system tray icon
Upstream URL:
Keywords: python systray
Licenses: GPL-3.0-only, LGPL-3.0-only
Submitter: nicoulaj
Maintainer: anonfunc
Last Packager: anonfunc
Votes: 8
Popularity: 0.136005
First Submitted: 2019-03-09 21:46 (UTC)
Last Updated: 2024-03-23 19:25 (UTC)

Latest Comments

anonfunc commented on 2024-01-13 16:49 (UTC)

@Daviteusz Thanks, I integrated the changes.

Daviteusz commented on 2024-01-11 23:55 (UTC) (edited on 2024-01-16 16:33 (UTC) by Daviteusz)

New working pkgbuild PEP 517 (new makedepends: python-sphinx)

pkgdesc="Allows to create a system tray icon"
depends=(python-six python-pillow 'python-xlib>=0.17' libappindicator-gtk3 python-gobject)
makedepends=(python-build python-installer python-wheel python-setuptools python-sphinx)

build() {
  cd "pystray-$pkgver"
  python -m build --wheel --no-isolation

package_python-pystray() {
  cd "pystray-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl

kruzah commented on 2021-01-07 13:26 (UTC)

Appears to miss a dependency on python-gobject. Looking at the source code of pystray, AppIndicator backend appears to require gi [1] even though it's not specified in as a dependency. Not having python-gobject installed results in module 'gi' has no attribute 'require_version'. This issue was reported to me by another user on an AUR package I maintain that has pystray as a dependency.


qontinuum commented on 2020-08-18 11:44 (UTC)

@JP-Undercover: Thank you

oUndercover commented on 2020-08-18 11:28 (UTC) (edited on 2020-08-18 11:29 (UTC) by oUndercover)

I've updated to the last LTS kernel (5.4) in Manjaro and typing import pystray from python 3.8.5 console returns:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/pystray/", line 48, in <module>
    Icon = backend().Icon
  File "/usr/lib/python3.8/site-packages/pystray/", line 40, in backend
    return importlib.import_module(__package__ + '._' + module)
  File "/usr/lib/python3.8/importlib/", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3.8/site-packages/pystray/", line 22, in <module>
    gi.require_version('AppIndicator3', '0.1')
  File "/usr/lib/python3.8/site-packages/gi/", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace AppIndicator3 not available

I managed to fix the error by installing libappindicator-gtk3 from the official arch repositories, so I'm guessing it's a missing dependency which Manjaro or myself might have done something to remove from the system because the package worked previously. After the fix it's working as expected.

kruzah commented on 2020-04-12 18:54 (UTC)

Build appears to fail if python2-pip is not installed; "WARNING: The pip package is not available, falling back to EasyInstall for handling setup_requires/test_requires; this is deprecated and will be removed in a future version." followed by a stack trace for syntax error in Installing pip appears to fix the issue.

yochananmarqos commented on 2019-12-18 20:49 (UTC)

python-sphinx / python2-sphinx is not required, it's only for building documentation.

yochananmarqos commented on 2019-09-23 22:24 (UTC) (edited on 2019-12-18 20:48 (UTC) by yochananmarqos)

This does not build as dependencies are missing. See the for details.

You should have a build() array.

You should add the dependencies separately for each package:

prepare() {
  cp -a ${_pkgname}-${pkgver}{,-py2}

build() {
  cd "$_pkgname-$pkgver"
  python build

  cd .. && cd "$_pkgname-$pkgver-py2"
  python2 build

package_python-${_pkgname}() {
  depends=('python-pillow' 'python-xlib')

  cd ${_pkgname}-$pkgver
  python install --root="$pkgdir" --optimize=1 --skip-build

package_python2-${_pkgname}() {
  depends=('python2-pillow' 'python2-xlib')

  cd ${_pkgname}-$pkgver-py2
  python2 install --root="$pkgdir" --optimize=1 --skip-build