diff --git a/python-python-pptx.changes b/python-python-pptx.changes index 382f798..ccc87d8 100644 --- a/python-python-pptx.changes +++ b/python-python-pptx.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 29 01:03:28 UTC 2026 - Steve Kowalik + +- Add patch support-new-pyparsing.patch: + * Avoid deprecation warnings from new pyparsing. +- List directories in %files explicitly. + ------------------------------------------------------------------- Fri Sep 27 17:49:50 UTC 2024 - Thiago Bertoldi diff --git a/python-python-pptx.spec b/python-python-pptx.spec index f2acb91..79f5ffb 100644 --- a/python-python-pptx.spec +++ b/python-python-pptx.spec @@ -1,7 +1,7 @@ # # spec file for package python-python-pptx # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # Copyright (c) 2021, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -25,6 +25,8 @@ Summary: Generate and manipulate Open XML PowerPoint (pptx) files License: MIT URL: http://github.com/scanny/python-pptx Source: https://files.pythonhosted.org/packages/source/p/python-pptx/python_pptx-%{version}.tar.gz +# PATCH-FIX-UPSTREAM Based on gh#scanny/python-pptx#1104 +Patch0: support-new-pyparsing.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 61.0.0} BuildRequires: python-rpm-macros @@ -64,6 +66,7 @@ Create, read, and update PowerPoint 2007+ (.pptx) files. %files %{python_files} %license LICENSE %doc HISTORY.rst README.rst -%{python_sitelib}/*pptx* +%{python_sitelib}/pptx +%{python_sitelib}/python_pptx-%{version}.dist-info %changelog diff --git a/support-new-pyparsing.patch b/support-new-pyparsing.patch new file mode 100644 index 0000000..ccdf354 --- /dev/null +++ b/support-new-pyparsing.patch @@ -0,0 +1,71 @@ +From 974ae2afa475e22cee517be414f61b1f2125f298 Mon Sep 17 00:00:00 2001 +From: Elenedeath Olawir <502132+Elenedeath@users.noreply.github.com> +Date: Tue, 6 Jan 2026 01:56:22 +0100 +Subject: [PATCH] Replace delimitedList with DelimitedList in cxml tests + +Updated usage of pyparsing's delimitedList to DelimitedList in the cxml test grammar for compatibility with newer pyparsing versions. +--- + tests/unitutil/cxml.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Index: python_pptx-1.0.2/tests/unitutil/cxml.py +=================================================================== +--- python_pptx-1.0.2.orig/tests/unitutil/cxml.py ++++ python_pptx-1.0.2/tests/unitutil/cxml.py +@@ -19,8 +19,8 @@ from pyparsing import ( + alphanums, + alphas, + dblQuotedString, +- delimitedList, +- removeQuotes, ++ DelimitedList, ++ remove_quotes, + stringEnd, + ) + +@@ -43,8 +43,8 @@ def element(cxel_str: str) -> BaseOxmlEl + + def xml(cxel_str: str) -> str: + """Return the XML generated from `cxel_str`.""" +- root_node.parseWithTabs() +- root_token = root_node.parseString(cxel_str) ++ root_node.parse_with_tabs() ++ root_token = root_node.parse_string(cxel_str) + xml = root_token.element.xml + return xml + +@@ -254,28 +254,28 @@ def grammar(): + attr_name = Word(alphas + ":") + attr_val = Word(alphanums + " %-./:_") + attr_def = Group(attr_name + equal + attr_val) +- attr_list = open_brace + delimitedList(attr_def) + close_brace ++ attr_list = open_brace + DelimitedList(attr_def) + close_brace + +- text = dblQuotedString.setParseAction(removeQuotes) ++ text = dblQuotedString.set_parse_action(remove_quotes) + + # w:jc{val=right} ---------------------------- + element = ( + tagname("tagname") + + Group(Optional(attr_list))("attr_list") + + Optional(text, default="")("text") +- ).setParseAction(Element.from_token) ++ ).set_parse_action(Element.from_token) + + child_node_list = Forward() + + node = Group( + element("element") + Group(Optional(slash + child_node_list))("child_node_list") +- ).setParseAction(connect_node_children) ++ ).set_parse_action(connect_node_children) + +- child_node_list << (open_paren + delimitedList(node) + close_paren | node) ++ child_node_list << (open_paren + DelimitedList(node) + close_paren | node) + + root_node = ( + element("element") + Group(Optional(slash + child_node_list))("child_node_list") + stringEnd +- ).setParseAction(connect_root_node_children) ++ ).set_parse_action(connect_root_node_children) + + return root_node +