Package Details: python-pystray 0.19.5-3

Git Clone URL: https://aur.archlinux.org/python-pystray.git (read-only, click to copy)
Package Base: python-pystray
Description: Allows to create a system tray icon
Upstream URL: https://github.com/moses-palmer/pystray
Keywords: python systray
Licenses: GPL-3.0-only, LGPL-3.0-only
Submitter: nicoulaj
Maintainer: anonfunc
Last Packager: anonfunc
Votes: 10
Popularity: 1.86
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)

pkgname="python-pystray"
pkgver=0.19.5
pkgrel=2
arch=(any)
license=(GPL3)
pkgdesc="Allows to create a system tray icon"
url="https://github.com/moses-palmer/pystray"
depends=(python-six python-pillow 'python-xlib>=0.17' libappindicator-gtk3 python-gobject)
makedepends=(python-build python-installer python-wheel python-setuptools python-sphinx)
source=("$pkgname-$pkgver.tar.gz::https://github.com/moses-palmer/pystray/archive/v${pkgver}.tar.gz")
b2sums=('34bea3d14cfde7ee7a7d2594da2386265fba34b36f4699b5877ea393dbf7e844fe441a1bda384bb6b3f279a544cba897e04509f7c47d69cb5168793665ae73d4')

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 setup.py 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.

[1] https://github.com/moses-palmer/pystray/blob/master/lib/pystray/_appindicator.py#L18

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/__init__.py", line 48, in <module>
    Icon = backend().Icon
  File "/usr/lib/python3.8/site-packages/pystray/__init__.py", line 40, in backend
    return importlib.import_module(__package__ + '._' + module)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3.8/site-packages/pystray/_appindicator.py", line 22, in <module>
    gi.require_version('AppIndicator3', '0.1')
  File "/usr/lib/python3.8/site-packages/gi/__init__.py", 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 setup.py. 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 setup.py 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 setup.py build

  cd .. && cd "$_pkgname-$pkgver-py2"
  python2 setup.py build
}

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

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

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

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