14
0

Accepting request 605514 from devel:languages:python:misc

reading/writing soundfiles in python

OBS-URL: https://build.opensuse.org/request/show/605514
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysndfile?expand=0&rev=1
This commit is contained in:
Todd R
2018-05-09 01:46:13 +00:00
committed by Git OBS Bridge
commit 60318072ea
7 changed files with 968 additions and 0 deletions

91
python-pysndfile.spec Normal file
View File

@@ -0,0 +1,91 @@
#
# spec file for package python-pysndfile
#
# 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
Name: python-pysndfile
Version: 1.1.0
# For license files
%define tag 2669bbf93fb01ae35048e7036ce1b9d6b6e6d205
Release: 0
Summary: Cython wrapper class for reading/writing soundfiles
License: LGPL-3.0
Group: Development/Languages/Python
Url: http://forge.ircam.fr/p/pysndfile
Source: https://files.pythonhosted.org/packages/source/p/pysndfile/pysndfile-%{version}.tar.gz
Source10: https://forge.ircam.fr/p/pysndfile/source/file/%{tag}/COPYING.txt
Source11: https://forge.ircam.fr/p/pysndfile/source/file/%{tag}/COPYING.LESSER.txt
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module setuptools}
BuildRequires: c++_compiler
BuildRequires: fdupes
BuildRequires: libsndfile-devel
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module pytest}
%endif
Requires: python-numpy
%python_subpackages
%description
pysndfile is a python package providing PySndfile a
Cython wrapper class around libsndfile . PySndfile
provides methods for reading and writing a large variety of soundfile
formats on a variety of plattforms. PySndfile provides a rather complete
access to the different sound file manipulation options that are
available in libsndfile.
Due to the use of libsndfile nearly all sound file formats, (besides mp3
and derived formats) can be read and written with PySndfile.
The interface has been designed such that a rather large subset of the
functionality of libsndfile can be used, notably the reading and writing
of strings into soundfile formats that support these, and a number of
sf\_commands that allow to control the way libsndfile reads and writes
the samples. One of the most important ones is the use of the clipping
command.
%prep
%setup -q -n pysndfile-%{version}
cp %{SOURCE10} .
cp %{SOURCE11} .
%build
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{python_sitearch}
%if %{with test}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python tests/pysndfile_test.py
}
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc ChangeLog README.md
%license COPYING.txt COPYING.LESSER.txt
%{python_sitearch}/*
%changelog