From 13acd01f7cb512f2acd6f92fb6d0c1ff41d766d337e565bd42f522c4f694d765 Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 9 May 2018 01:24:35 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + SoundFile-0.10.2.tar.gz | 3 ++ python-SoundFile.changes | 21 ++++++++++ python-SoundFile.spec | 91 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 139 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 SoundFile-0.10.2.tar.gz create mode 100644 python-SoundFile.changes create mode 100644 python-SoundFile.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/SoundFile-0.10.2.tar.gz b/SoundFile-0.10.2.tar.gz new file mode 100644 index 0000000..a0203ae --- /dev/null +++ b/SoundFile-0.10.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:637f6218c867b8cae80f6989634a0813b416b3e6132480d056e6e5a89a921571 +size 40309 diff --git a/python-SoundFile.changes b/python-SoundFile.changes new file mode 100644 index 0000000..fd92b79 --- /dev/null +++ b/python-SoundFile.changes @@ -0,0 +1,21 @@ +------------------------------------------------------------------- +Wed May 9 01:09:10 UTC 2018 - toddrme2178@gmail.com + +- Update to 0.10.2 + * Should now work with cx_freeze. + * Several documentation fixes in the README. + * Removes deprecated ctype argument in favor of dtype in buffer_*(). + * Adds SoundFile.frames in favor of now-deprecated __len__(). + * Improves performance of blocks and SoundFile.blocks(). + * Improves import time by using CFFI's out of line mode. + * Adds a build script for building distributions. + +------------------------------------------------------------------- +Wed Aug 9 14:05:47 UTC 2017 - toddrme2178@gmail.com + +- Not compatible with some architectures + +------------------------------------------------------------------- +Tue Aug 8 19:39:24 UTC 2017 - toddrme2178@gmail.com + +- Initial version diff --git a/python-SoundFile.spec b/python-SoundFile.spec new file mode 100644 index 0000000..593abf4 --- /dev/null +++ b/python-SoundFile.spec @@ -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 `__, +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 `__, 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