forked from pool/python-pydub
Accepting request 1146988 from devel:languages:python
- Add patch fix-assertions.patch: * Fix assetion methods. - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/request/show/1146988 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydub?expand=0&rev=9
This commit is contained in:
33
fix-assertions.patch
Normal file
33
fix-assertions.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 66c1bf7813ae8621a71484fdcdf609734c0d8efd Mon Sep 17 00:00:00 2001
|
||||
From: sirfredrick <sirfredrick@mathbf.com>
|
||||
Date: Thu, 28 Dec 2023 13:37:36 -0800
|
||||
Subject: [PATCH] Fix test assertions
|
||||
|
||||
assertEquals() was a deprecated alias for assertEqual() and has been
|
||||
removed in Python 3.12 See https://docs.python.org/3/whatsnew/3.12.html#id3
|
||||
---
|
||||
test/test.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/test/test.py b/test/test.py
|
||||
index 1965761f..2da3d0fa 100644
|
||||
--- a/test/test.py
|
||||
+++ b/test/test.py
|
||||
@@ -1086,7 +1086,7 @@ def test_from_file_clean_fail(self):
|
||||
tmp_wav_file.flush()
|
||||
self.assertRaises(CouldntDecodeError, AudioSegment.from_file, tmp_wav_file.name)
|
||||
files = os.listdir(tempfile.tempdir)
|
||||
- self.assertEquals(files, [os.path.basename(tmp_wav_file.name)])
|
||||
+ self.assertEqual(files, [os.path.basename(tmp_wav_file.name)])
|
||||
|
||||
if sys.platform == 'win32':
|
||||
os.remove(tmp_wav_file.name)
|
||||
@@ -1109,7 +1109,7 @@ def setUp(self):
|
||||
|
||||
def test_split_on_silence_complete_silence(self):
|
||||
seg = AudioSegment.silent(5000)
|
||||
- self.assertEquals( split_on_silence(seg), [] )
|
||||
+ self.assertEqual( split_on_silence(seg), [] )
|
||||
|
||||
def test_split_on_silence_test1(self):
|
||||
self.assertEqual(
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 16 03:31:40 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch fix-assertions.patch:
|
||||
* Fix assetion methods.
|
||||
- Switch to pyproject macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 7 23:23:13 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pydub
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -21,13 +21,16 @@ Version: 0.25.1
|
||||
Release: 0
|
||||
Summary: Audio manipulation with Python
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/jiaaro/pydub
|
||||
Source: https://github.com/jiaaro/pydub/archive/v%{version}.tar.gz#/pydub-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE skip_libopenh264-7.patch gh#jiaaro/pydub#700 mcepl@suse.com
|
||||
# We don't have libopenh264-7 on the plain openSUSE
|
||||
Patch0: skip_libopenh264-7.patch
|
||||
# PATCH-FIX-UPSTREAM gh#jiaaro/pydub#769
|
||||
Patch1: fix-assertions.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: ffmpeg
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -46,10 +49,10 @@ A Python module to manipulate audio with a high level interface.
|
||||
%autosetup -p1 -n pydub-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
@@ -58,7 +61,7 @@ export NO_OPENH264=1
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%{python_sitelib}/pydub-%{version}*-info
|
||||
%{python_sitelib}/pydub-%{version}.dist-info
|
||||
%{python_sitelib}/pydub
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user