From f80b1f0cc22dc8657c6b771d2dbbb9d657b1a4c58f8ffde6edadc07994f14f3e Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 5 Nov 2018 18:45:28 +0000 Subject: [PATCH] GIL-less Portaudio Streams for Python OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pastream?expand=0&rev=1 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + pastream-0.2.0.post0.tar.gz | 3 ++ python-pastream-rpmlintrc | 1 + python-pastream.changes | 4 ++ python-pastream.spec | 84 +++++++++++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pastream-0.2.0.post0.tar.gz create mode 100644 python-pastream-rpmlintrc create mode 100644 python-pastream.changes create mode 100644 python-pastream.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/pastream-0.2.0.post0.tar.gz b/pastream-0.2.0.post0.tar.gz new file mode 100644 index 0000000..0b6209e --- /dev/null +++ b/pastream-0.2.0.post0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89438f55a5e0ba6967fb4e1f6bb37a2b2af35c730590d3c60439493610db66b7 +size 64101 diff --git a/python-pastream-rpmlintrc b/python-pastream-rpmlintrc new file mode 100644 index 0000000..1ad95ab --- /dev/null +++ b/python-pastream-rpmlintrc @@ -0,0 +1 @@ +addFilter("explicit-lib-dependency libsndfile") diff --git a/python-pastream.changes b/python-pastream.changes new file mode 100644 index 0000000..d42be87 --- /dev/null +++ b/python-pastream.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Fri Nov 2 02:34:46 UTC 2018 - Todd R + +- Initial version diff --git a/python-pastream.spec b/python-pastream.spec new file mode 100644 index 0000000..c247f60 --- /dev/null +++ b/python-pastream.spec @@ -0,0 +1,84 @@ +# +# spec file for package python-pastream +# +# 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 https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-pastream +Version: 0.2.0.post0 +Release: 0 +Summary: GIL-less Portaudio Streams for Python +License: MIT +Group: Development/Languages/Python +Url: http://github.com/tgarc/pastream +Source0: https://files.pythonhosted.org/packages/source/p/pastream/pastream-%{version}.tar.gz +Source100: python-pastream-rpmlintrc +BuildRequires: %{python_module cffi >= 1.4.0} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pa-ringbuffer >= 0.1.2} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(portaudiocpp) +# SECTION test requirements +BuildRequires: %{python_module SoundFile >= 0.9.0} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pytest >= 3.0} +BuildRequires: %{python_module sounddevice >= 0.3.9} +# /SECTION +Requires: libsndfile +Requires: portaudio +Requires: python-SoundFile >= 0.9.0 +Requires: python-cffi >= 1.0.0 +Requires: python-pa-ringbuffer >= 0.1.2 +Requires: python-sounddevice >= 0.3.9 +Recommends: python-numpy + +%python_subpackages + +%description +Pastream builds on top of portaudio and sounddevice python bindings +to provide some more functionality. Note that in addition to the +pastream library, pastream includes a command line application for +playing and recording audio files. + +%prep +%setup -q -n pastream-%{version} +sed -i -e '/^#!\//, 1d' src/pastream.py + +%build +export CFLAGS="%{optflags}" +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +# Tests require an audio device +# %%check +# pushd tests +# %%{python_expand export PYTHONPATH=%%{buildroot}%%{$python_sitearch} +# py.test-%%{$python_bin_suffix} . +# } +# popd + +%files %{python_files} +%doc CHANGELOG.rst README.rst +%license LICENSE +%python3_only %{_bindir}/pastream +%{python_sitearch}/* + +%changelog