commit b2289961d64104cd280be82af9ed42c3442dd562a9c2c6ce2963fef7ef872cde Author: Alexandre Rogoski Date: Tue Apr 20 13:10:53 2010 +0000 Accepting request 37115 from home:vuntz Copy from home:vuntz/python-virtkey via accept of submit request 37115 revision 6. Request was accepted with message: Fine... OBS-URL: https://build.opensuse.org/request/show/37115 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtkey?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/python-virtkey-0.50.tar.bz2 b/python-virtkey-0.50.tar.bz2 new file mode 100644 index 0000000..4c782e1 --- /dev/null +++ b/python-virtkey-0.50.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cfb50a6fa9f7f08bf390356853a772c594c9a9f46d4f2e41fd7a43f43e215c6 +size 19290 diff --git a/python-virtkey-use-pkg-config.patch b/python-virtkey-use-pkg-config.patch new file mode 100644 index 0000000..cf37820 --- /dev/null +++ b/python-virtkey-use-pkg-config.patch @@ -0,0 +1,30 @@ +Index: python-virtkey-0.50/setup.py +=================================================================== +--- python-virtkey-0.50.orig/setup.py ++++ python-virtkey-0.50/setup.py +@@ -1,10 +1,23 @@ + #!/usr/bin/python + + from distutils.core import setup, Extension ++import commands ++ ++# From http://code.activestate.com/recipes/502261-python-distutils-pkg-config/ ++def pkgconfig(*packages, **kw): ++ flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} ++ for token in commands.getoutput("pkg-config --libs --cflags %s" % ' '.join(packages)).split(): ++ if flag_map.has_key(token[:2]): ++ kw.setdefault(flag_map.get(token[:2]), []).append(token[2:]) ++ else: # throw others to extra_link_args ++ kw.setdefault('extra_link_args', []).append(token) ++ for k, v in kw.iteritems(): # remove duplicated ++ kw[k] = list(set(v)) ++ return kw ++ + setup(name="virtkey", + ext_modules=[Extension("virtkey", +- ["python-virtkey.c","ucs2keysym.c"],include_dirs=['/usr/include/gtk-2.0', '/usr/include/glib-2.0', '/usr/lib/glib-2.0/include', '/usr/include/pango-1.0', '/usr/lib/gtk-2.0/include', '/usr/include/cairo'], +- libraries=["X11","Xtst","glib-2.0","gdk-x11-2.0"] ++ ["python-virtkey.c","ucs2keysym.c"], **pkgconfig('glib-2.0', 'gdk-2.0', 'x11', 'xtst') + )], + version="0.01" + ) diff --git a/python-virtkey.changes b/python-virtkey.changes new file mode 100644 index 0000000..c30d704 --- /dev/null +++ b/python-virtkey.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Fri Apr 2 03:21:38 CEST 2010 - vuntz@opensuse.org + +- New package. + diff --git a/python-virtkey.spec b/python-virtkey.spec new file mode 100644 index 0000000..3f8477c --- /dev/null +++ b/python-virtkey.spec @@ -0,0 +1,58 @@ +# +# spec file for package python-virtkey (Version 0.50) +# +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + + +Name: python-virtkey +Version: 0.50 +Release: 1 +License: GPLv2+ +Summary: Python extension to emulate keypresses +Group: Development/Libraries/Python +Url: https://launchpad.net/virtkey +Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM python-virtkey-use-pkg-config.patch vuntz@opensuse.org -- Fix build by using pkg-config to get compilation flags, sent by mail upstream (no bug tracker) +Patch0: python-virtkey-use-pkg-config.patch +BuildRequires: glib2-devel +BuildRequires: gtk2-devel +BuildRequires: python-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%py_requires + +%description +Python extension for emulating keypresses and getting current keyboard layout. + +%prep +%setup -q -c +%patch0 -p1 + +%build +%{__python} setup.py build + +%install +%{__python} setup.py install --prefix=%{_prefix} --root %{buildroot} + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-,root,root) +%{python_sitearch}/virtkey.so +%{python_sitearch}/virtkey-*.egg-info + +%changelog