From c1d427ed109a8f167aeb1488e768373d14998c8f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 9 Jan 2010 06:04:22 +0000 Subject: [PATCH] initial import --- .cvsignore | 1 + ...ba-if-desktop-gnome-interface-at-spi.patch | 68 +++++++++++++++++ import.log | 1 + pyatspi.spec | 75 +++++++++++++++++++ sources | 1 + 5 files changed, 146 insertions(+) create mode 100644 0001-Use-pyatspi_corba-if-desktop-gnome-interface-at-spi.patch create mode 100644 import.log create mode 100644 pyatspi.spec diff --git a/.cvsignore b/.cvsignore index e69de29..3ea6f1b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +pyatspi-0.1.4.tar.bz2 diff --git a/0001-Use-pyatspi_corba-if-desktop-gnome-interface-at-spi.patch b/0001-Use-pyatspi_corba-if-desktop-gnome-interface-at-spi.patch new file mode 100644 index 0000000..9d8a864 --- /dev/null +++ b/0001-Use-pyatspi_corba-if-desktop-gnome-interface-at-spi.patch @@ -0,0 +1,68 @@ +From dca73eb4051d4c56601da757e98deb60c1af6deb Mon Sep 17 00:00:00 2001 +From: Willie Walker +Date: Wed, 6 Jan 2010 13:44:46 -0500 +Subject: [PATCH] Use pyatspi_corba if /desktop/gnome/interface/at-spi-corba is True + +--- + pyatspi/__init__.py | 44 +++++++++++++++++++++++++++++++------------- + 1 files changed, 31 insertions(+), 13 deletions(-) + +diff --git a/pyatspi/__init__.py b/pyatspi/__init__.py +index 9b508e3..5106df2 100644 +--- a/pyatspi/__init__.py ++++ b/pyatspi/__init__.py +@@ -12,20 +12,38 @@ + #along with this program; if not, write to the Free Software + #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +-__version__ = (1, 9, 0) ++try: ++ import gconf ++ gconfClient = gconf.client_get_default() ++ useCorba = gconfClient.get_bool("/desktop/gnome/interface/at-spi-corba") ++except: ++ useCorba = False ++finally: ++ del gconfClient ++ del gconf + +-import constants +-from Accessibility import * ++if useCorba: ++ import sys ++ import pyatspi_corba ++ sys.modules['pyatspi'] = pyatspi_corba ++ del sys ++else: ++ __version__ = (1, 9, 0) + +-from dbus.mainloop.glib import DBusGMainLoop +-DBusGMainLoop (set_as_default=True) +-del DBusGMainLoop ++ import constants ++ from Accessibility import * + +-#This is a re-creation of the namespace pollution implemented +-#by PyORBit. +-import sys +-import Accessibility +-sys.modules['Accessibility'] = Accessibility +-del sys ++ from dbus.mainloop.glib import DBusGMainLoop ++ DBusGMainLoop (set_as_default=True) ++ del DBusGMainLoop + +-import appevent as event ++ #This is a re-creation of the namespace pollution implemented ++ #by PyORBit. ++ import sys ++ import Accessibility ++ sys.modules['Accessibility'] = Accessibility ++ del sys ++ ++ import appevent as event ++ ++del useCorba +-- +1.5.6.5 + diff --git a/import.log b/import.log new file mode 100644 index 0000000..b18f292 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +pyatspi-0_1_4-3_fc12:HEAD:pyatspi-0.1.4-3.fc12.src.rpm:1263016855 diff --git a/pyatspi.spec b/pyatspi.spec new file mode 100644 index 0000000..513c5cf --- /dev/null +++ b/pyatspi.spec @@ -0,0 +1,75 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%global debug_package %{nil} + +Name: pyatspi +Version: 0.1.4 +Release: 3%{?dist} +Summary: Python bindings for at-spi + +Group: Development/Languages +License: LGPLv2 +URL: http://www.linuxfoundation.org/en/AT-SPI_on_D-Bus +Source0: http://download.gnome.org/sources/pyatspi/0.1/%{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: python + +Requires: GConf2 +Requires: at-spi2-core + +# https://bugzilla.gnome.org/show_bug.cgi?id=606251 +Patch0: 0001-Use-pyatspi_corba-if-desktop-gnome-interface-at-spi.patch + +BuildArch: noarch + +%description +at-spi allows assistive technologies to access GTK-based +applications. Essentially it exposes the internals of applications for +automation, so tools such as screen readers, magnifiers, or even +scripting interfaces can query and interact with GUI controls. + +This version of at-spi is a major break from previous versions. +It has been completely rewritten to use D-Bus rather than +ORBIT / CORBA for its transport protocol. + +This package includes a python client library for at-spi. + + +%prep +%setup -q +%patch0 -p1 -b .better-switch + + +%build +%configure +make + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYING AUTHORS README +%{python_sitelib}/* + + +%changelog +* Thu Jan 7 2010 Matthias Clasen - 0.1.4-3 +- Incorporate review feedback + +* Thu Jan 7 2010 Matthias Clasen - 0.1.4-2 +- Fix License field +- Change CORBA/DBus switching method + +* Tue Dec 22 2009 Matthias Clasen - 0.1.4-1 +- Update to 0.1.4 + +* Sat Dec 5 2009 Matthias Clasen - 0.1.3-1 +- Initial packaging diff --git a/sources b/sources index e69de29..b2857fa 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +bfe79896407c60e8b7c98db4f9097eec pyatspi-0.1.4.tar.bz2