forked from pool/python-pyxdg
- Add upstream py314.patch to fix tests with Python 3.14
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyxdg?expand=0&rev=40
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.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
|
||||||
|
*.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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
43
py314.patch
Normal file
43
py314.patch
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
From 9291d419017263c922869d79ac1fe8d423e5f929 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sam James <sam@gentoo.org>
|
||||||
|
Date: Sat, 31 May 2025 18:52:45 +0100
|
||||||
|
Subject: Menu: handle Python 3.14 ast.Str changes
|
||||||
|
|
||||||
|
ast.Str is gone and replaced by ast.Constant.
|
||||||
|
---
|
||||||
|
xdg/Menu.py | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/xdg/Menu.py b/xdg/Menu.py
|
||||||
|
index 1dd2af5..71f5e61 100644
|
||||||
|
--- a/xdg/Menu.py
|
||||||
|
+++ b/xdg/Menu.py
|
||||||
|
@@ -411,7 +411,7 @@ class Rule:
|
||||||
|
def fromFilename(cls, type, filename):
|
||||||
|
tree = ast.Expression(
|
||||||
|
body=ast.Compare(
|
||||||
|
- left=ast.Str(filename),
|
||||||
|
+ left=ast.Constant(filename),
|
||||||
|
ops=[ast.Eq()],
|
||||||
|
comparators=[ast.Attribute(
|
||||||
|
value=ast.Name(id='menuentry', ctx=ast.Load()),
|
||||||
|
@@ -799,7 +799,7 @@ class XMLMenuBuilder(object):
|
||||||
|
elif tag == 'Category':
|
||||||
|
category = node.text
|
||||||
|
return ast.Compare(
|
||||||
|
- left=ast.Str(category),
|
||||||
|
+ left=ast.Constant(category),
|
||||||
|
ops=[ast.In()],
|
||||||
|
comparators=[ast.Attribute(
|
||||||
|
value=ast.Name(id='menuentry', ctx=ast.Load()),
|
||||||
|
@@ -810,7 +810,7 @@ class XMLMenuBuilder(object):
|
||||||
|
elif tag == 'Filename':
|
||||||
|
filename = node.text
|
||||||
|
return ast.Compare(
|
||||||
|
- left=ast.Str(filename),
|
||||||
|
+ left=ast.Constant(filename),
|
||||||
|
ops=[ast.Eq()],
|
||||||
|
comparators=[ast.Attribute(
|
||||||
|
value=ast.Name(id='menuentry', ctx=ast.Load()),
|
||||||
|
--
|
||||||
|
cgit v1.2.3
|
166
python-pyxdg.changes
Normal file
166
python-pyxdg.changes
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 8 06:52:30 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Add upstream py314.patch to fix tests with Python 3.14
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 11 05:49:39 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pyproject macros.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 26 08:43:46 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Don't import deprecated imp module
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 21 12:32:33 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add sle15_python_module_pythons (jsc#PED-68)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 13 22:44:21 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Make calling of %{sle15modernpython} optional.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Sep 24 11:19:43 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 0.28:
|
||||||
|
* BaseDirectory: Add support for $XDG_STATE_DIR
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 29 07:22:54 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Obsolete python-xdg to resolve conflicting state (boo#1178803)
|
||||||
|
* see https://bbs.archlinux.org/viewtopic.php?id=262403 for a workaround
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 3 02:30:45 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to version 0.27
|
||||||
|
* Menu: Fix compatibility with Python >= 3.8.4
|
||||||
|
* Menu: Fix several AttributeErrors
|
||||||
|
* Menu: Fix duplication of menu entries due when Layout is provided
|
||||||
|
* MenuEditor: Fix fromstring typo
|
||||||
|
* Certain tests are more independent of external system conditions
|
||||||
|
* Standardise shebangs to /usr/bin/env python3
|
||||||
|
- drop new-api.patch, resource_leak.patch merged upstream
|
||||||
|
- get example test data from gitlab repository -- pass all tests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 5 12:47:20 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Also conflict with the python-xdg as we provide same namespace
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 30 08:38:48 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Do not provide xdg namespace as there is python-xdg package now
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 16 12:13:19 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Skip over RulesTest.test_rule_from_node test
|
||||||
|
(https://gitlab.freedesktop.org/xdg/pyxdg/-/issues/20)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 2 08:27:33 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add setuptools dependency
|
||||||
|
- Use pytest to run tests rather than nose that will break with
|
||||||
|
python 3.10
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Mar 1 01:21:17 UTC 2020 - Mook <mook.moz+com.novell@gmail.com>
|
||||||
|
|
||||||
|
- Fix Menu.py using attributes that no longer exist
|
||||||
|
Patch from https://gitlab.freedesktop.org/xdg/pyxdg/-/merge_requests/2
|
||||||
|
* new-api.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 15 06:48:50 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
- Fix test data to use sys.executable
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 24 13:12:09 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||||
|
|
||||||
|
- add resource_leak.patch - Fix several ResourceWarnings: unclosed file
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 4 12:53:24 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Remove superfluous devel dependency for noarch package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 22 19:10:38 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 22 19:07:50 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Fix provides/obsoletes to actually provide python2-xdg too
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 2 14:02:20 UTC 2017 - jmatejek@suse.com
|
||||||
|
|
||||||
|
- drop test-icon test that fails because its standard is too old
|
||||||
|
- drop hicolor-icon-theme requirement which was needed for that test
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 5 21:47:54 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Don't provide python2-xdg. Singlespec packages should use the
|
||||||
|
correct name.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 1 18:49:28 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Add literal python-xdg provides.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 24 17:35:04 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Fix source url
|
||||||
|
- Various small spec file cleanups.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 13 09:16:00 UTC 2017 - aloisio@gmx.com
|
||||||
|
|
||||||
|
- Converted to single-spec
|
||||||
|
- Updated source URL
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 22 09:16:26 UTC 2015 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- It doesn't need a shared-mime-info version that high.
|
||||||
|
The unit tests just compare against pre-set values based on that
|
||||||
|
version. So remove BuildRequires version check and disable
|
||||||
|
tests for earlier openSUSE versions.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 11 10:30:31 UTC 2015 - matwey.kornilov@gmail.com
|
||||||
|
|
||||||
|
- Provide/Obsolete python-xdg
|
||||||
|
For some reason there is already python-xdg which should be
|
||||||
|
python-pyxdg according to guidelines (pypi name is pyxdg).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Oct 10 19:37:34 UTC 2015 - matwey.kornilov@gmail.com
|
||||||
|
|
||||||
|
- Initial version
|
||||||
|
|
78
python-pyxdg.spec
Normal file
78
python-pyxdg.spec
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-pyxdg
|
||||||
|
#
|
||||||
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
|
#
|
||||||
|
# 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 https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define oldpython python
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
Name: python-pyxdg
|
||||||
|
Version: 0.28
|
||||||
|
Release: 0
|
||||||
|
Summary: Implementations of freedesktop.org standards in python
|
||||||
|
License: LGPL-2.1-only
|
||||||
|
URL: https://freedesktop.org/wiki/Software/pyxdg
|
||||||
|
Source0: https://files.pythonhosted.org/packages/source/p/pyxdg/pyxdg-%{version}.tar.gz
|
||||||
|
# Test data: examples
|
||||||
|
Source1: https://gitlab.freedesktop.org/xdg/pyxdg/-/archive/rel-%{version}/pyxdg-rel-%{version}.tar.gz?path=test/example#/pyxdg-%{version}-test-example.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM https://cgit.freedesktop.org/xdg/pyxdg/patch/?id=9291d419017263c922869d79ac1fe8d423e5f929 Menu: handle Python 3.14 ast.Str changes
|
||||||
|
Patch0: py314.patch
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: hicolor-icon-theme
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildRequires: shared-mime-info
|
||||||
|
Requires: hicolor-icon-theme
|
||||||
|
Requires: shared-mime-info
|
||||||
|
Conflicts: python-xdg
|
||||||
|
Obsoletes: python-xdg
|
||||||
|
BuildArch: noarch
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
PyXDG is a python library to access freedesktop.org standards. Currently supported are:
|
||||||
|
* Base Directory Specification Version 0.6
|
||||||
|
* Menu Specification Version 1.0
|
||||||
|
* Desktop Entry Specification Version 1.0
|
||||||
|
* Icon Theme Specification Version 0.8
|
||||||
|
* Recent File Spec 0.2
|
||||||
|
* Shared-MIME-Database Specification 0.13
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n pyxdg-%{version} -b 1
|
||||||
|
%autopatch -p1
|
||||||
|
cp -r ../pyxdg-rel-%{version}-test-example/test/example test/
|
||||||
|
sed -i 's/imp /importlib /' test/test_basedirectory.py
|
||||||
|
|
||||||
|
%build
|
||||||
|
%pyproject_wheel
|
||||||
|
|
||||||
|
%install
|
||||||
|
%pyproject_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%pytest test/test*.py -v
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%license COPYING
|
||||||
|
%doc README AUTHORS ChangeLog
|
||||||
|
%{python_sitelib}/xdg
|
||||||
|
%{python_sitelib}/pyxdg-%{version}.dist-info
|
||||||
|
|
||||||
|
%changelog
|
BIN
pyxdg-0.28-test-example.tar.gz
(Stored with Git LFS)
Normal file
BIN
pyxdg-0.28-test-example.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pyxdg-0.28.tar.gz
(Stored with Git LFS)
Normal file
BIN
pyxdg-0.28.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user