Resolves: #1951150

(cherry picked from Fedora commit 1d002cfce9)
This commit is contained in:
Tom spot Callaway 2021-04-13 15:48:19 -04:00 committed by Kalev Lember
parent 38789830c9
commit b3c1085ee5
4 changed files with 19 additions and 37 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
/pyxdg-0.25.tar.gz
/pyxdg-0.26.tar.gz
/pyxdg-0.27.tar.gz
/pyxdg-test-example.tar.gz

View File

@ -1,18 +0,0 @@
diff -up pyxdg-0.26/xdg/Menu.py.fixOnlyShowIn pyxdg-0.26/xdg/Menu.py
--- pyxdg-0.26/xdg/Menu.py.fixOnlyShowIn 2018-11-01 11:34:26.222123436 -0400
+++ pyxdg-0.26/xdg/Menu.py 2018-11-01 11:36:39.459203908 -0400
@@ -298,11 +298,11 @@ class Menu:
entry.Show = NO_EXEC
self.Visible -= 1
elif xdg.Config.windowmanager:
- if (entry.DesktopEntry.OnlyShowIn != [] and (
- xdg.Config.windowmanager not in entry.DesktopEntry.OnlyShowIn
+ if (entry.DesktopEntry.getOnlyShowIn() != [] and (
+ xdg.Config.windowmanager not in entry.DesktopEntry.getOnlyShowIn()
)
) or (
- xdg.Config.windowmanager in entry.DesktopEntry.NotShowIn
+ xdg.Config.windowmanager in entry.DesktopEntry.getNotShowIn()
):
entry.Show = NOT_SHOW_IN
self.Visible -= 1

View File

@ -1,29 +1,27 @@
%bcond_without tests
Name: pyxdg
Version: 0.26
Release: 13%{?dist}
Version: 0.27
Release: 1%{?dist}
Summary: Python library to access freedesktop.org standards
License: LGPLv2
URL: http://freedesktop.org/Software/pyxdg
Source0: https://pypi.python.org/packages/source/r/PyXDG/%{name}-%{version}.tar.gz
# https://gitlab.freedesktop.org/xdg/pyxdg/merge_requests/2
Patch0: pyxdg-0.26-fix-OnlyShowIn.patch
Patch1: pyxdg-0.26-getType-fix.patch
Source0: %pypi_source
# Upstream did not include the test/examples directory in the source tarball
# This tarball is a copy of the directory from https://cgit.freedesktop.org/xdg/pyxdg/
Source1: pyxdg-test-example.tar.gz
BuildArch: noarch
# These are needed for the nose tests.
BuildRequires: hicolor-icon-theme
BuildRequires: shared-mime-info
BuildRequires: hicolor-icon-theme
BuildRequires: shared-mime-info
%description
PyXDG is a python library to access freedesktop.org standards
PyXDG is a python library to access freedesktop.org standards.
%package -n python%{python3_pkgversion}-pyxdg
Summary: Python3 library to access freedesktop.org standards
Summary: Python3 library to access freedesktop.org standards
BuildRequires: python%{python3_pkgversion}-devel
%if %{with check}
# These are needed for the nose tests.
BuildRequires: python%{python3_pkgversion}-nose
BuildRequires: python%{python3_pkgversion}-nose
%endif
%{?python_provide:%python_provide python%{python3_pkgversion}-pyxdg}
@ -32,9 +30,7 @@ PyXDG is a python library to access freedesktop.org standards. This
package contains a Python 3 version of PyXDG.
%prep
%setup -q
%patch0 -p1 -b .fixOnlyShowIn
%patch1 -p1 -b .getType
%setup -q -a 1
%build
%py3_build
@ -42,12 +38,10 @@ package contains a Python 3 version of PyXDG.
%install
%py3_install
%if %{with check}
%check
# icon-test currently fails
# https://bugs.freedesktop.org/show_bug.cgi?id=104846
nosetests-%{python3_version} || :
%endif
%files -n python%{python3_pkgversion}-pyxdg
%license COPYING
@ -56,6 +50,9 @@ nosetests-%{python3_version} || :
%{python3_sitelib}/pyxdg-*.egg-info
%changelog
* Fri May 14 2021 Kalev Lember <klember@redhat.com> - 0.27-1
- update to 0.27
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.26-13
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937

View File

@ -1 +1,2 @@
SHA512 (pyxdg-0.26.tar.gz) = f5306e6e15af07df2599017500fc8ad83e722e5d5c6e4fda014aab1d77df92a3c3199a5be7a889faaecab72861e9910be9d80142d29856eb7a11f6ab9a923bd2
SHA512 (pyxdg-0.27.tar.gz) = acb24153a4e3e0d8333f1c965c024b15d44f623497b561fc0e9be60d4411441af1dc61f11dcfb22587a510451237a341440bf7ff77a6ab6446dceb83b3c380e2
SHA512 (pyxdg-test-example.tar.gz) = be077b663b5b94c93655d8622db06d3582a81fc4180038e52b45144f9a6c173d4ff5bf450f9ef56b76652f845e0283c527122fdaa84e35f834523ae205c5ab59