From 40e8344e4575a876a5ba85d7e8dd20de34ba63e9b19291ccf03c6ceac32056ff Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 16 Jun 2025 06:25:36 +0000 Subject: [PATCH] - Switch to pyroject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-stack-data?expand=0&rev=23 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + pygments.patch | 24 ++++++++++++ python-stack-data.changes | 77 +++++++++++++++++++++++++++++++++++++++ python-stack-data.spec | 76 ++++++++++++++++++++++++++++++++++++++ stack_data-0.6.3.tar.gz | 3 ++ 6 files changed, 204 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pygments.patch create mode 100644 python-stack-data.changes create mode 100644 python-stack-data.spec create mode 100644 stack_data-0.6.3.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pygments.patch b/pygments.patch new file mode 100644 index 0000000..39e8454 --- /dev/null +++ b/pygments.patch @@ -0,0 +1,24 @@ +Index: stack_data-0.6.3/tests/test_core.py +=================================================================== +--- stack_data-0.6.3.orig/tests/test_core.py ++++ stack_data-0.6.3/tests/test_core.py +@@ -573,8 +573,8 @@ def test_absolute_filename(): + [ + r".c { color: #(999999|ababab); font-style: italic }", + r".err { color: #a61717; background-color: #e3d2d2 }", +- r".c-ExecutingNode { color: #(999999|ababab); font-style: italic; background-color: #ffff00 }", +- r".err-ExecutingNode { color: #a61717; background-color: #ffff00 }", ++ r".c-ExecutingNode { color: #(999999|ababab); font-style: italic; background-color: #(ffff00|FF0) }", ++ r".err-ExecutingNode { color: #A61717; background-color: #(ffff00|FF0) }", + ] + ) + def test_executing_style_defs(expected): +@@ -582,7 +582,7 @@ def test_executing_style_defs(expected): + formatter = HtmlFormatter(style=style) + style_defs = formatter.get_style_defs() + +- assert re.search(expected, style_defs) ++ assert re.search(expected, style_defs, re.IGNORECASE) + + + def test_example(): diff --git a/python-stack-data.changes b/python-stack-data.changes new file mode 100644 index 0000000..6988354 --- /dev/null +++ b/python-stack-data.changes @@ -0,0 +1,77 @@ +------------------------------------------------------------------- +Mon Jun 16 06:12:25 UTC 2025 - Steve Kowalik + +- Switch to pyroject macros. + +------------------------------------------------------------------- +Mon Jan 20 13:14:44 UTC 2025 - Markéta Machová + +- Add pygments.patch to fix non-skipped tests with Pygments 2.19 + +------------------------------------------------------------------- +Mon Nov 27 16:11:39 UTC 2023 - Dirk Müller + +- update to 0.6.3: + * Python 3.12 support + * handle weird six import error +- drop support-typeguard-4.patch (upstream) + +------------------------------------------------------------------- +Wed Aug 23 07:28:06 UTC 2023 - ecsos + +- Revert restrict to older Cython. Can not find any specification. + +------------------------------------------------------------------- +Mon Aug 14 12:52:59 UTC 2023 - Dirk Müller + +- skip more tests for newer pygments version + +------------------------------------------------------------------- +Sun Aug 13 19:27:59 UTC 2023 - Dirk Müller + +- restrict to older Cython + +------------------------------------------------------------------- +Mon May 15 09:53:06 UTC 2023 - Steve Kowalik + +- Add patch support-typeguard-4.patch: + * Support typeguard 4+. + +------------------------------------------------------------------- +Thu May 4 21:23:25 UTC 2023 - Dirk Müller + +- update to 0.6.2: + * python 3.11 support + * add tests +- drop 29-Pygments-2-12.patch (upstream) + +------------------------------------------------------------------- +Fri Apr 21 12:37:06 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:45:15 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Wed Jan 4 01:04:23 UTC 2023 - Matej Cepl + +- Skip test_pygments_example test, because it is just too + unstable given the ever changing output from Pygments. + +------------------------------------------------------------------- +Mon May 16 12:18:16 UTC 2022 - Matej Cepl + +- Update to 0.2.0: + - Fallback to basic Source.pieces when there is no Source.tree. + - Handle nodes inside f-strings missing location info from + asttokens +- Add 29-Pygments-2-12.patch (gh#alexmojaki/stack_data#29) making + the package compabile with Pygments 2.12. + +------------------------------------------------------------------- +Fri Jan 14 21:54:31 UTC 2022 - Matej Cepl + +- Initial effort to package stack-data 0.1.3. diff --git a/python-stack-data.spec b/python-stack-data.spec new file mode 100644 index 0000000..68dc113 --- /dev/null +++ b/python-stack-data.spec @@ -0,0 +1,76 @@ +# +# spec file for package python-stack-data +# +# Copyright (c) 2025 SUSE LLC +# +# 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-stack-data +Version: 0.6.3 +Release: 0 +Summary: Extract data from python stack frames and tracebacks +License: MIT +URL: https://github.com/alexmojaki/stack_data +Source: https://files.pythonhosted.org/packages/source/s/stack_data/stack_data-%{version}.tar.gz +BuildRequires: %{python_module Cython} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 44} +BuildRequires: %{python_module setuptools_scm >= 3.4.3} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# PATCH-FIX-UPSTREAM https://github.com/alexmojaki/stack_data/pull/58 Modify test_executing_style_defs to work with Pygments 2.19 +Patch0: pygments.patch +Requires: python-asttokens +Requires: python-executing +Requires: python-pure-eval +Suggests: python-littleutils +Suggests: python-pygments +Suggests: python-pytest +Suggests: python-typeguard +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module asttokens} +BuildRequires: %{python_module executing} +BuildRequires: %{python_module littleutils} +BuildRequires: %{python_module pure-eval} +BuildRequires: %{python_module pygments} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module typeguard} +# /SECTION +%python_subpackages + +%description +Extract data from python stack frames and tracebacks for informative displays + +%prep +%autosetup -p1 -n stack_data-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# incompatibility with even older Pygments +%pytest -k 'not ((test_core and test_pygments_example) or (test_serializer and test_example))' + +%files %{python_files} +%{python_sitelib}/stack_data +%{python_sitelib}/stack_data-%{version}.dist-info + +%changelog diff --git a/stack_data-0.6.3.tar.gz b/stack_data-0.6.3.tar.gz new file mode 100644 index 0000000..831de21 --- /dev/null +++ b/stack_data-0.6.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9 +size 44707