14
0
forked from pool/python-pyxdg

- Update to 0.26.0:

* IconTheme: Add support for Scale and ScaledDirectories keys.
  * DesktopEntry: New method findTryExec()
  * Menu: More efficient processing of filter rules by building a Python AST
  * Mime: Prefer the first mimetype found for a file extension, instead of the last
  * Mime: Allow unknown magic-matching rule formats
  * Mime: GlobDB has new methods first_match and all_matches for matching paths
  * Mime: New function get_extensions to get extensions for a given mime type
  * Mime: Fix MagicDB.match_data crashing with an unknown 'possible' mimetype
  * Mime: Correctly handle __NOMAGIC__ rule removing previous magic matches
  * Menu: XML parsing reworked
  * BaseDirectory: More secure creation of a fallback runtime directory with get_runtime_dir(strict=False)
  * Various miscellaneous improvements to testing.

- Fix provides/obsoletes to actually provide python2-xdg too

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyxdg?expand=0&rev=11
This commit is contained in:
Tomáš Chvátal
2018-05-22 19:18:42 +00:00
committed by Git OBS Bridge
parent 3eda7ac35f
commit 7830c5ca30
6 changed files with 36 additions and 72 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pyxdg
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,41 +16,29 @@
#
%if 0%{?sle_version} > 120100 || 0%{?suse_version} > 1320
%bcond_without tests
%else
%bcond_with tests
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-pyxdg
Version: 0.25
Version: 0.26
Release: 0
Summary: Implementations of freedesktop.org standards in python
License: LGPL-2.1
License: LGPL-2.1-only
Group: Development/Languages/Python
Url: http://freedesktop.org/wiki/Software/pyxdg
URL: http://freedesktop.org/wiki/Software/pyxdg
Source: https://files.pythonhosted.org/packages/source/p/pyxdg/pyxdg-%{version}.tar.gz
Source1: http://people.freedesktop.org/~takluyver/pyxdg-%{version}.tar.gz.asc
Source2: %{name}.keyring
BuildRequires: %{python_module devel}
%if %{with tests}
BuildRequires: %{python_module nose}
%endif
BuildRequires: hicolor-icon-theme
BuildRequires: python-rpm-macros
BuildRequires: shared-mime-info
Requires: hicolor-icon-theme
Requires: shared-mime-info
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: python-xdg = %{version}
Obsoletes: python-xdg < %{version}
BuildArch: noarch
# Change <= to < after version 0.25
%ifpython2
Obsoletes: %{oldpython}-xdg < %{version}
Provides: %{oldpython}-xdg <= %{version}
%endif
%ifpython3
Provides: python3-xdg = %{version}
Obsoletes: python3-xdg <= %{version}
Provides: %{oldpython}-xdg = %{version}
%endif
%python_subpackages
@@ -72,17 +60,12 @@ PyXDG is a python library to access freedesktop.org standards. Currently support
%install
%python_install
%if %{with tests}
%check
# test-icon fails because it's testing against spec version 0.8
# and our files moved to 0.9
rm test/test-icon.py
%python_expand nosetests-%{$python_bin_suffix}
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc README AUTHORS COPYING ChangeLog
%license COPYING
%doc README AUTHORS ChangeLog
%{python_sitelib}/xdg
%{python_sitelib}/pyxdg-%{version}-py*.egg-info