- 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
This commit is contained in:
2025-01-10 03:44:26 +00:00
committed by Git OBS Bridge
parent c7fea6a358
commit de2730a313
3 changed files with 63 additions and 5 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 10 03:43:55 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- 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 <dmueller@suse.com> Mon Nov 11 14:22:59 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-python-xmp-toolkit # 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 # 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
@@ -22,9 +22,10 @@ Version: 2.0.2
Release: 0 Release: 0
Summary: Python XMP Toolkit for working with metadata Summary: Python XMP Toolkit for working with metadata
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/python-xmp-toolkit/python-xmp-toolkit 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 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 pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
@@ -54,13 +55,11 @@ A Python XMP Toolkit for working with metadata.
%check %check
%pytest -k 'not (test_single_namspace_single_path_leaf_names or test_exempi or test_files)' %pytest -k 'not (test_single_namspace_single_path_leaf_names or test_exempi or test_files)'
#%%pyunittest -v
%files %{python_files} %files %{python_files}
%doc AUTHORS CHANGELOG README.rst %doc AUTHORS CHANGELOG README.rst
%license LICENSE %license LICENSE
#%%{python_sitelib}/python_xmp_toolkit
%{python_sitelib}/python_xmp_toolkit-%{version}.dist-info
%{python_sitelib}/libxmp %{python_sitelib}/libxmp
%{python_sitelib}/python_xmp_toolkit-%{version}.dist-info
%changelog %changelog

53
support-python-313.patch Normal file
View File

@@ -0,0 +1,53 @@
From 44722ea1db87a079770a2f2ef883ef44621f6f04 Mon Sep 17 00:00:00 2001
From: Rostyslav Lobov <rostislavlobov.k@gmail.com>
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()