From de2730a3135674009181541527fdff981110ebbb3cede47f5692e9e671007a71 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 10 Jan 2025 03:44:26 +0000 Subject: [PATCH] - Add patch support-python-313.patch: * Support Python 3.13 by not using unittest.makeSuite. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-xmp-toolkit?expand=0&rev=3 --- python-python-xmp-toolkit.changes | 6 ++++ python-python-xmp-toolkit.spec | 9 +++--- support-python-313.patch | 53 +++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 support-python-313.patch diff --git a/python-python-xmp-toolkit.changes b/python-python-xmp-toolkit.changes index 5faaf32..8885ff9 100644 --- a/python-python-xmp-toolkit.changes +++ b/python-python-xmp-toolkit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 10 03:43:55 UTC 2025 - Steve Kowalik + +- Add patch support-python-313.patch: + * Support Python 3.13 by not using unittest.makeSuite. + ------------------------------------------------------------------- Mon Nov 11 14:22:59 UTC 2024 - Dirk Müller diff --git a/python-python-xmp-toolkit.spec b/python-python-xmp-toolkit.spec index 6954425..d1a4f85 100644 --- a/python-python-xmp-toolkit.spec +++ b/python-python-xmp-toolkit.spec @@ -1,7 +1,7 @@ # # spec file for package python-python-xmp-toolkit # -# Copyright (c) 2024 SUSE LLC +# 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 @@ -22,9 +22,10 @@ Version: 2.0.2 Release: 0 Summary: Python XMP Toolkit for working with metadata License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/python-xmp-toolkit/python-xmp-toolkit Source: https://files.pythonhosted.org/packages/source/p/python-xmp-toolkit/python-xmp-toolkit-%{version}.tar.gz +# PATCH-FIX-UPSTREAM Based on one commit of gh#python-xmp-toolkit/python-xmp-toolkit#96 +Patch0: support-python-313.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} @@ -54,13 +55,11 @@ A Python XMP Toolkit for working with metadata. %check %pytest -k 'not (test_single_namspace_single_path_leaf_names or test_exempi or test_files)' -#%%pyunittest -v %files %{python_files} %doc AUTHORS CHANGELOG README.rst %license LICENSE -#%%{python_sitelib}/python_xmp_toolkit -%{python_sitelib}/python_xmp_toolkit-%{version}.dist-info %{python_sitelib}/libxmp +%{python_sitelib}/python_xmp_toolkit-%{version}.dist-info %changelog diff --git a/support-python-313.patch b/support-python-313.patch new file mode 100644 index 0000000..5a7f40f --- /dev/null +++ b/support-python-313.patch @@ -0,0 +1,53 @@ +From 44722ea1db87a079770a2f2ef883ef44621f6f04 Mon Sep 17 00:00:00 2001 +From: Rostyslav Lobov +Date: Wed, 10 Apr 2024 13:17:10 -0400 +Subject: [PATCH 5/9] tests: remove deprecated/unneeded stuff + +--- + test/test_core_unit.py | 11 ----------- + test/test_files.py | 10 ---------- + 2 files changed, 21 deletions(-) + +Index: python-xmp-toolkit-2.0.2/test/test_core_unit.py +=================================================================== +--- python-xmp-toolkit-2.0.2.orig/test/test_core_unit.py ++++ python-xmp-toolkit-2.0.2/test/test_core_unit.py +@@ -620,17 +620,6 @@ class UnicodeTestCase(unittest.TestCase) + # It's a no-op in 3.x. + self.assertTrue(True) + +-def suite(): +- suite = unittest.TestSuite() +- suite.addTest(unittest.makeSuite(XMPMetaTestCase)) +- suite.addTest(unittest.makeSuite(UtilsTestCase)) +- return suite +- +-def test( verbose=2 ): +- all_tests = suite() +- runner = unittest.TextTestRunner(verbosity=verbose) +- result = runner.run(all_tests) +- return result, runner + + if __name__ == "__main__": + #test() +Index: python-xmp-toolkit-2.0.2/test/test_files.py +=================================================================== +--- python-xmp-toolkit-2.0.2.orig/test/test_files.py ++++ python-xmp-toolkit-2.0.2/test/test_files.py +@@ -384,16 +384,6 @@ class XMPFilesTestCase(unittest.TestCase + + self.assertEqual(prop, "foo") + +-def suite(): +- the_suite = unittest.TestSuite() +- the_suite.addTest(unittest.makeSuite(XMPFilesTestCase)) +- return the_suite +- +-def test( verbose=2 ): +- all_tests = suite() +- runner = unittest.TextTestRunner(verbosity=verbose) +- result = runner.run(all_tests) +- return result, runner + + if __name__ == "__main__": + unittest.main()