[packages/python-pyaudio] - new
baggins
baggins at pld-linux.org
Fri Oct 5 18:34:59 CEST 2012
commit 91618cd2f869f69dc25e72e5aaf4914a64065c3e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Fri Oct 5 18:34:34 2012 +0200
- new
python-pyaudio.spec | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
---
diff --git a/python-pyaudio.spec b/python-pyaudio.spec
new file mode 100644
index 0000000..cf16b56
--- /dev/null
+++ b/python-pyaudio.spec
@@ -0,0 +1,73 @@
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+
+%define module pyaudio
+Summary: Python bindings for PortAudio
+Name: python-%{module}
+Version: 0.2.4
+Release: 0.1
+License: MIT
+Group: Development/Languages/Python
+Source0: http://people.csail.mit.edu/hubert/pyaudio/packages/%{name}-%{version}.tar.gz
+# Source0-md5: 623809778f3d70254a25492bae63b575
+URL: http://people.csail.mit.edu/hubert/pyaudio/
+BuildRequires: python-devel
+BuildRequires: python-distribute
+BuildRequires: rpm-pythonprov
+# if py_postclean is used
+BuildRequires: rpmbuild(macros) >= 1.219
+Requires: python-libs
+Requires: python-modules
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+PyAudio provides Python bindings for PortAudio, the cross-platform
+audio I/O library. With PyAudio, you can easily use Python to play
+and record audio on a variety of platforms.
+
+PyAudio is designed to work with the PortAudio v19 API 2.0. Note that
+PyAudio currently only supports blocking-mode audio I/O.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+# fix #!/usr/bin/env python -> #!/usr/bin/python:
+%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py
+
+%build
+# CC/CFLAGS is only for arch packages - remove on noarch packages
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags}" \
+%{__python} setup.py build
+
+%{?with_tests:%{__python} setup.py test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install \
+ --skip-build \
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
+# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
+%{py_sitedir}/*.py[co]
+%attr(755,root,root) %{py_sitedir}/*.so
+%if "%{py_ver}" > "2.4"
+%{py_sitedir}/TEMPLATE-*.egg-info
+%endif
+%{_examplesdir}/%{name}-%{version}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pyaudio.git/commitdiff/91618cd2f869f69dc25e72e5aaf4914a64065c3e
More information about the pld-cvs-commit
mailing list