forked from pool/python-pyxdg
Compare commits
4 Commits
Author | SHA256 | Date | |
---|---|---|---|
f5fb6761c6 | |||
d449361ae5 | |||
27043cd0f3 | |||
b9b340a63a |
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
|
@@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
Tue Sep 26 08:43:46 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pyxdg
|
# spec file for package python-pyxdg
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%define oldpython python
|
%define oldpython python
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pyxdg
|
Name: python-pyxdg
|
||||||
@@ -28,8 +27,12 @@ URL: https://freedesktop.org/wiki/Software/pyxdg
|
|||||||
Source0: https://files.pythonhosted.org/packages/source/p/pyxdg/pyxdg-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/p/pyxdg/pyxdg-%{version}.tar.gz
|
||||||
# Test data: examples
|
# 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
|
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 pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: hicolor-icon-theme
|
BuildRequires: hicolor-icon-theme
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -57,10 +60,10 @@ cp -r ../pyxdg-rel-%{version}-test-example/test/example test/
|
|||||||
sed -i 's/imp /importlib /' test/test_basedirectory.py
|
sed -i 's/imp /importlib /' test/test_basedirectory.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -70,6 +73,6 @@ sed -i 's/imp /importlib /' test/test_basedirectory.py
|
|||||||
%license COPYING
|
%license COPYING
|
||||||
%doc README AUTHORS ChangeLog
|
%doc README AUTHORS ChangeLog
|
||||||
%{python_sitelib}/xdg
|
%{python_sitelib}/xdg
|
||||||
%{python_sitelib}/pyxdg-%{version}-py*.egg-info
|
%{python_sitelib}/pyxdg-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user