# # spec file for package python-SoundFile # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without test %define oldpython python Name: python-SoundFile Version: 0.10.2 Release: 0 Summary: An audio library based on libsndfile, CFFI and NumPy License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/bastibe/PySoundFile Source: https://files.pythonhosted.org/packages/source/S/SoundFile/SoundFile-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros %if %{with test} BuildRequires: %{python_module cffi >= 0.6} BuildRequires: %{python_module numpy} BuildRequires: %{python_module pytest} BuildRequires: libsndfile1 %endif Requires: libsndfile1 Requires: python-cffi >= 0.6 Recommends: python-numpy %ifpython2 Obsoletes: %{oldpython}-PySoundFile < %{version} Provides: %{oldpython}-PySoundFile = %{version} %endif %ifpython3 # Change to < in next release after 0.9.0.post1 Obsoletes: python3-PySoundFile <= %{version} Provides: python3-PySoundFile = %{version} %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: x86_64 aarch64 ppc64le %python_subpackages %description PySoundFile is an audio library based on libsndfile, CFFI and NumPy. Full documentation is available on http://pysoundfile.readthedocs.org/. PySoundFile can read and write sound files. File reading/writing is supported through libsndfile, which itself is accessed through CFFI, a foreign function interface for Python calling C code. PySoundFile represents audio data as NumPy arrays. %prep %setup -q -n SoundFile-%{version} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %if %{with test} %check %python_exec setup.py test %endif %files %{python_files} %defattr(-,root,root,-) %doc README.rst %license LICENSE %{python_sitelib}/* %changelog