15
0

Accepting request 605508 from devel:languages:python:misc

Python sound file I/O that supports numpy

OBS-URL: https://build.opensuse.org/request/show/605508
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SoundFile?expand=0&rev=1
This commit is contained in:
Todd R
2018-05-09 01:24:35 +00:00
committed by Git OBS Bridge
commit 13acd01f7c
5 changed files with 139 additions and 0 deletions

91
python-SoundFile.spec Normal file
View File

@@ -0,0 +1,91 @@
#
# 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 <http://www.mega-nerd.com/libsndfile/>`__,
which is a free, cross-platform, open-source (LGPL) library for reading
and writing many different sampled sound file formats that runs on many
platforms including Windows, OS X, and Unix. It is accessed through
`CFFI <http://cffi.readthedocs.org/>`__, which is a foreign function
interface for Python calling C code. CFFI is supported for CPython 2.6+,
3.x and PyPy 2.0+. 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