[arch-commits] Commit in pyatspi/repos/extra-any (PKGBUILD PKGBUILD async.patch)
Jan Steffens
heftig at archlinux.org
Thu Aug 9 07:57:11 UTC 2018
Date: Thursday, August 9, 2018 @ 07:57:11
Author: heftig
Revision: 331283
archrelease: copy trunk to extra-any
Added:
pyatspi/repos/extra-any/PKGBUILD
(from rev 331282, pyatspi/trunk/PKGBUILD)
pyatspi/repos/extra-any/async.patch
(from rev 331282, pyatspi/trunk/async.patch)
Deleted:
pyatspi/repos/extra-any/PKGBUILD
-------------+
PKGBUILD | 114 ++++++++++++++++++++++++++++++----------------------------
async.patch | 82 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 142 insertions(+), 54 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2018-08-09 07:54:58 UTC (rev 331282)
+++ PKGBUILD 2018-08-09 07:57:11 UTC (rev 331283)
@@ -1,54 +0,0 @@
-# $Id$
-# Contributor: Ionut Biru <ibiru at archlinux.org>
-
-pkgbase=pyatspi
-pkgname=(python-atspi python2-atspi)
-pkgver=2.26.0
-pkgrel=2
-arch=(any)
-url="https://wiki.linuxfoundation.org/en/AT-SPI_on_D-Bus"
-license=(GPL2)
-makedepends=(python-gobject python2-gobject at-spi2-core gnome-common git)
-_commit=813ba139a46c071103efd45ec65481213974f07f # tags/PYATSPI_2_26_0^0
-source=("git+https://git.gnome.org/browse/pyatspi2#commit=$_commit")
-sha256sums=('SKIP')
-
-pkgver() {
- cd pyatspi2
- git describe --tags | sed 's/^PYATSPI_//;s/_/./g;s/-/+/g'
-}
-
-prepare() {
- mkdir python2 python3
- cd pyatspi2
- NOCONFIGURE=1 ./autogen.sh
-}
-
-_build() (
- cd python$1
- ../pyatspi2/configure --prefix=/usr --with-python=/usr/bin/python$1
- make
-)
-
-build() {
- _build 2
- _build 3
-}
-
-package_python-atspi() {
- pkgdesc="Python 3 bindings for at-spi"
- depends=(python-gobject at-spi2-core)
-
- cd python3
- make DESTDIR="$pkgdir" install
-}
-
-package_python2-atspi() {
- pkgdesc="Python 2 bindings for at-spi"
- depends=(python2-gobject at-spi2-core)
-
- cd python2
- make DESTDIR="$pkgdir" install
-}
-
-# vim:set ts=2 sw=2 et:
Copied: pyatspi/repos/extra-any/PKGBUILD (from rev 331282, pyatspi/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2018-08-09 07:57:11 UTC (rev 331283)
@@ -0,0 +1,60 @@
+# $Id$
+# Contributor: Ionut Biru <ibiru at archlinux.org>
+
+pkgbase=pyatspi
+pkgname=(python-atspi python2-atspi)
+pkgver=2.26.0
+pkgrel=3
+arch=(any)
+url="https://wiki.linuxfoundation.org/en/AT-SPI_on_D-Bus"
+license=(GPL2)
+makedepends=(python-gobject python2-gobject at-spi2-core gnome-common git)
+_commit=813ba139a46c071103efd45ec65481213974f07f # tags/PYATSPI_2_26_0^0
+source=("git+https://gitlab.gnome.org/GNOME/pyatspi2.git#commit=$_commit"
+ async.patch)
+sha256sums=('SKIP'
+ 'c3faf5065230bb5c6c32187c9f8e8c3ec4222bcfc2293ef91c60f033ab9372f1')
+
+pkgver() {
+ cd pyatspi2
+ git describe --tags | sed 's/^PYATSPI_//;s/_/./g;s/-/+/g'
+}
+
+prepare() {
+ mkdir python2 python3
+ cd pyatspi2
+
+ # https://bugs.archlinux.org/task/59547
+ patch -Np1 -i ../async.patch
+
+ NOCONFIGURE=1 ./autogen.sh
+}
+
+_build() (
+ cd python$1
+ ../pyatspi2/configure --prefix=/usr --with-python=/usr/bin/python$1
+ make
+)
+
+build() {
+ _build 2
+ _build 3
+}
+
+package_python-atspi() {
+ pkgdesc="Python 3 bindings for at-spi"
+ depends=(python-gobject at-spi2-core)
+
+ cd python3
+ make DESTDIR="$pkgdir" install
+}
+
+package_python2-atspi() {
+ pkgdesc="Python 2 bindings for at-spi"
+ depends=(python2-gobject at-spi2-core)
+
+ cd python2
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
Copied: pyatspi/repos/extra-any/async.patch (from rev 331282, pyatspi/trunk/async.patch)
===================================================================
--- async.patch (rev 0)
+++ async.patch 2018-08-09 07:57:11 UTC (rev 331283)
@@ -0,0 +1,82 @@
+From 29a7b929f7f1160b643dc5f5911533887173fcff Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro at hroncok.cz>
+Date: Thu, 28 Jun 2018 17:10:33 +0200
+Subject: [PATCH] Rename async to asynchronous, keep backwards comaptibility
+
+async is a keyword in Python 3.7 and keeping it results in SyntaxError.
+
+Fixes https://gitlab.gnome.org/GNOME/pyatspi2/issues/1
+---
+ pyatspi/registry.py | 35 +++++++++++++++++++++++++++--------
+ 1 file changed, 27 insertions(+), 8 deletions(-)
+
+diff --git a/pyatspi/registry.py b/pyatspi/registry.py
+index cb28395..f73ee16 100644
+--- a/pyatspi/registry.py
++++ b/pyatspi/registry.py
+@@ -50,9 +50,9 @@ class Registry(object):
+ reference to the Accessibility.Registry singleton. Doing so is harmless and
+ has no point.
+
+- @@ivar async: Should event dispatch to local listeners be decoupled from event
+- receiving from the registry?
+- @@type async: boolean
++ @@ivar asynchronous: Should event dispatch to local listeners be decoupled
++ from event receiving from the registry?
++ @@type asynchronous: boolean
+ @@ivar reg: Reference to the real, wrapped registry object
+ @@type reg: Accessibility.Registry
+ @@ivar dev: Reference to the device controller
+@@ -111,25 +111,44 @@ class Registry(object):
+
+ self.has_implementations = True
+
+- self.async = False # not fully supported yet
++ self.asynchronous = False # not fully supported yet
+ self.started = False
+ self.event_listeners = dict()
+
++ def __getattr__(self, name):
++ """
++ For backwards compatibility with old API
++ """
++ if name == 'async':
++ return self.asynchronous
++ return object.__getattr__(self, name)
++
++ def __setattr__(self, name, value):
++ """
++ For backwards compatibility with old API
++ """
++ if name == 'async':
++ self.asynchronous = value
++ object.__setattr__(self, name, value)
++
+ def _set_default_registry (self):
+ self._set_registry (MAIN_LOOP_GLIB)
+
+- def start(self, async=False, gil=True):
++ def start(self, asynchronous=False, gil=True, **kwargs):
+ """
+ Enter the main loop to start receiving and dispatching events.
+
+- @@param async: Should event dispatch be asynchronous (decoupled) from
+- event receiving from the AT-SPI registry?
+- @@type async: boolean
++ @@param asynchronous: Should event dispatch be asynchronous
++ (decoupled) from event receiving from the AT-SPI registry?
++ @@type asynchronous: boolean
+ @@param gil: Add an idle callback which releases the Python GIL for a few
+ milliseconds to allow other threads to run? Necessary if other threads
+ will be used in this process.
+ @@type gil: boolean
+ """
++ if 'async' in kwargs:
++ # support previous API
++ asynchronous = kwargs['async']
+ if not self.has_implementations:
+ self._set_default_registry ()
+ self.started = True
+--
+2.17.1
+
More information about the arch-commits
mailing list