Hello community,
here is the log from the commit of package python-xdg for openSUSE:Factory
checked in at Fri Dec 18 14:17:37 CET 2009.
--------
--- python-xdg/python-xdg.changes 2009-08-09 19:01:58.000000000 +0200
+++ /mounts/work_src_done/STABLE/python-xdg/python-xdg.changes 2009-12-17 10:59:54.000000000 +0100
@@ -1,0 +2,10 @@
+Thu Dec 17 10:57:27 CET 2009 - vuntz@opensuse.org
+
+- Update to version 0.18:
+ + DesktopEntry.py: Add getMimeTypes() method, correctly returning
+ strings
+ + DesktopEntry.py: Deprecated getMimeType() returning list of regex
+ + Menu.py: Add support for XDG_MENU_PREFIX
+ + Mime.py: Add get_type_by_contents()
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
pyxdg-0.17.tar.bz2
New:
----
pyxdg-0.18.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-xdg.spec ++++++
--- /var/tmp/diff_new_pack.La2D6N/_old 2009-12-18 14:17:06.000000000 +0100
+++ /var/tmp/diff_new_pack.La2D6N/_new 2009-12-18 14:17:06.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package python-xdg (Version 0.17)
+# spec file for package python-xdg (Version 0.18)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,10 +19,10 @@
Name: python-xdg
%define _name pyxdg
-Summary: Python library to access freedesktop.org standards
-Version: 0.17
-Release: 2
-License: LGPL v2.1 or later
+Summary: Python library to use freedesktop.org specifications
+Version: 0.18
+Release: 1
+License: LGPLv2.1+
Group: Development/Libraries/Python
Url: http://freedesktop.org/Software/pyxdg
Source: %{_name}-%{version}.tar.bz2
@@ -32,29 +32,8 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
-python-xdg (PyXDG) is a python library to access freedesktop.org
-standards.
-
-Currently supported are: * Base Directory Specification Version 0.6
-
-* Menu Specification Version 1.0-draft1
-
-* Desktop Entry Specification Version 0.9.4
-
-* Icon Theme Specification Version 0.8
-
-* Recent File Spec 0.2
-
-* Shared-MIME-Database Specification 0.13
-
-
-
-Authors:
---------
- Current Maintainer:
- Heinrich Wendel
- Inactive:
- Sergey Kuleshov
+python-xdg (PyXDG) is a python library to use freedesktop.org
+specifications.
%prep
%setup -q -n %{_name}-%{version}
++++++ pyxdg-0.17.tar.bz2 -> pyxdg-0.18.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyxdg-0.17/ChangeLog new/pyxdg-0.18/ChangeLog
--- old/pyxdg-0.17/ChangeLog 2008-10-30 23:34:13.000000000 +0100
+++ new/pyxdg-0.18/ChangeLog 2009-10-28 18:26:26.000000000 +0100
@@ -1,3 +1,10 @@
+Version 0.18
+
+ * DesktopEntry.py: Add getMimeTypes() method, correctly returning strings
+ * DesktopEntry.py: Deprecated getMimeType() returning list of regex
+ * Menu.py: Add support for XDG_MENU_PREFIX
+ * Mime.py: Add get_type_by_contents()
+
Version 0.17
2008-10-30 Heinrich Wendel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyxdg-0.17/PKG-INFO new/pyxdg-0.18/PKG-INFO
--- old/pyxdg-0.17/PKG-INFO 2008-10-30 23:38:35.000000000 +0100
+++ new/pyxdg-0.18/PKG-INFO 2009-10-28 18:38:46.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: pyxdg
-Version: 0.17
+Version: 0.18
Summary: PyXDG contains implementations of freedesktop.org standards in python.
Home-page: http://cvs.freedesktop.org/cgi-bin/viewcvs.cgi/pyxdg/
Author: Heinrich Wendel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyxdg-0.17/README new/pyxdg-0.18/README
--- old/pyxdg-0.17/README 2005-05-02 20:07:39.000000000 +0200
+++ new/pyxdg-0.18/README 2009-10-28 18:22:47.000000000 +0100
@@ -1,19 +1,20 @@
The XDG Package contains:
- Implementation of the XDG-Base-Directory Standard
- http://www.freedesktop.org/standards/basedir-spec
+ http://standards.freedesktop.org/basedir-spec/
- Implementation of the XDG-Desktop Standard
- http://www.freedesktop.org/standards/desktop-entry-spec
+ http://standards.freedesktop.org/basedir-spec/
- Implementation of the XDG-Menu Standard
- http://www.freedesktop.org/standards/menu-spec
+ http://standards.freedesktop.org/basedir-spec/
- Implementation of the XDG-Icon-Theme Standard
- http://www.freedesktop.org/standards/icon-theme-spec
+ http://standards.freedesktop.org/basedir-spec/
- Implementation of the XDG-Shared MIME-info Database
- http://www.freedesktop.org/standards/shared-mime-info
+ http://standards.freedesktop.org/basedir-spec/
- Implementation of the XDG-Recent File Storage Specification
- http://www.freedesktop.org/standards/recent-file-spec
+ http://standards.freedesktop.org/basedir-spec/
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyxdg-0.17/setup.py new/pyxdg-0.18/setup.py
--- old/pyxdg-0.17/setup.py 2008-10-30 23:37:28.000000000 +0100
+++ new/pyxdg-0.18/setup.py 2009-10-28 18:36:06.000000000 +0100
@@ -3,7 +3,7 @@
from distutils.core import setup
setup( name = "pyxdg",
- version = "0.17",
+ version = "0.18",
description = "PyXDG contains implementations of freedesktop.org standards in python.",
maintainer = "Heinrich Wendel",
maintainer_email = "h_wendel@cojobo.net",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyxdg-0.17/test/test-desktop.py new/pyxdg-0.18/test/test-desktop.py
--- old/pyxdg-0.17/test/test-desktop.py 2008-08-07 19:09:41.000000000 +0200
+++ new/pyxdg-0.18/test/test-desktop.py 2009-10-28 18:31:42.000000000 +0100
@@ -16,7 +16,7 @@
print e
return
- entry.setLocale("C")
+ #entry.setLocale("C")
entry.getName()
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyxdg-0.17/xdg/DesktopEntry.py new/pyxdg-0.18/xdg/DesktopEntry.py
--- old/pyxdg-0.17/xdg/DesktopEntry.py 2008-08-10 17:51:31.000000000 +0200
+++ new/pyxdg-0.18/xdg/DesktopEntry.py 2009-10-28 18:35:17.000000000 +0100
@@ -67,8 +67,11 @@
return self.get('SwallowExec')
def getActions(self):
return self.get('Actions', list=True)
+ """ @deprecated, use getMimeTypes instead """
def getMimeType(self):
return self.get('MimeType', list=True, type="regex")
+ def getMimeTypes(self):
+ return self.get('MimeType', list=True)
def getSortOrder(self):
return self.get('SortOrder', list=True)
def getDev(self):
@@ -362,7 +365,7 @@
self.errors.append("Invalid key: %s" % key)
def checkType(self, key, type):
- if not self.type == type:
+ if not self.getType() == type:
self.errors.append("Key '%s' only allowed in Type=%s" % (key, type))
def checkOnlyShowIn(self, value):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyxdg-0.17/xdg/Menu.py new/pyxdg-0.18/xdg/Menu.py
--- old/pyxdg-0.17/xdg/Menu.py 2008-10-30 23:32:42.000000000 +0100
+++ new/pyxdg-0.18/xdg/Menu.py 2009-10-28 18:20:44.000000000 +0100
@@ -498,11 +498,12 @@
filename = __getFileName(filename)
# use default if no filename given
+ if not filename:
+ candidate = os.environ.get('XDG_MENU_PREFIX', '') + "applications.menu"
+ filename = __getFileName(candidate)
+
if not filename:
- filename = __getFileName("applications.menu")
-
- if not filename:
- raise ParsingError('File not found', "/etc/xdg/menus/applications.menu")
+ raise ParsingError('File not found', "/etc/xdg/menus/%s" % candidate)
# check if it is a .menu file
if not os.path.splitext(filename)[1] == ".menu":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyxdg-0.17/xdg/Mime.py new/pyxdg-0.18/xdg/Mime.py
--- old/pyxdg-0.17/xdg/Mime.py 2008-03-02 14:57:48.000000000 +0100
+++ new/pyxdg-0.18/xdg/Mime.py 2008-10-30 23:47:30.000000000 +0100
@@ -274,24 +274,28 @@
if not c:
break
+ def match_data(self, data, max_pri=100, min_pri=0):
+ pris=self.types.keys()
+ pris.sort(lambda a, b: -cmp(a, b))
+ for pri in pris:
+ #print pri, max_pri, min_pri
+ if pri>max_pri:
+ continue
+ if primax_pri:
- continue
- if pri