diff options
Diffstat (limited to 'dev-python/pyaudio')
-rw-r--r-- | dev-python/pyaudio/Manifest | 2 | ||||
-rw-r--r-- | dev-python/pyaudio/files/pyaudio-0.2.11-python310-size_t.patch | 28 | ||||
-rw-r--r-- | dev-python/pyaudio/pyaudio-0.2.11-r2.ebuild | 42 |
3 files changed, 72 insertions, 0 deletions
diff --git a/dev-python/pyaudio/Manifest b/dev-python/pyaudio/Manifest index 7bfc2313b993..0041498127ff 100644 --- a/dev-python/pyaudio/Manifest +++ b/dev-python/pyaudio/Manifest @@ -1,3 +1,5 @@ +AUX pyaudio-0.2.11-python310-size_t.patch 845 BLAKE2B 68eee6ebd83440e0f42a51a1c88735f5c6a7b2b541413faadee0260c22f65baff4d922100304fe719e9a6818ec98e3ce0bb51c763c916ae76385511d0d4ae12c SHA512 a9db774bcaaeb6693871ae49ec584bf58543469cd5c166e5ecb61efc354be7fde2a4c3283c1fe070a3d9d102301fa1a5f39d844418d52cd88565e1e62348992b DIST PyAudio-0.2.11.tar.gz 37428 BLAKE2B 18db51a651876135a6afc6c8c60e2221017a311fe1aec10497905bc35b81a73b5e9f27201431566bac3d13bcf582ec12a3b818c51f0e5e70aeb4ad177608461a SHA512 64db5542ee60837c9b07677e146fc7b060ff47c8b1c04cbb575bce79dd3ed4776c201e169ff2860f27dbe9e00a77046ba0cb925b55f7c546f8de46c6df68954e EBUILD pyaudio-0.2.11-r1.ebuild 1091 BLAKE2B 7ebb50ca17f473fa13ebdf973da074cb00bc161b0c2bf46701a5935a4eeb20763f5790e813ba74f6518db9a7f1a9caabffc554a80755c45bb5156691e8177d3f SHA512 41a4115bb3b8a2da4403fb7358fc3602d83cce90118770d59c31199dadd6e0f639260e62f77b1235d22f16ecca00a860910ad9c75fb8dbdf6628cc7e6f346e05 +EBUILD pyaudio-0.2.11-r2.ebuild 1182 BLAKE2B 7ee7cb3992233b3a08e79fd17fcb81ac63f6fa51fdc8ac6066b0d9ce14afe1b4c50a64eda0bb99ab2f0d4892bae33327711c64d2b8e83e01187363101b8c4614 SHA512 cf7d5d4fd000b4a32f8f6537bf525c97e17a9849acba15955e91097cb50f3a5ca9f19d58f58449842cfa8102da422cc589e936273eedfc6f40885bd96c252f36 MISC metadata.xml 629 BLAKE2B 13fcd9ca931e654d70fa328133f5c1aff9410c7c504338d7fd14f53f2ea971c5418c3f8e242d2cc35cd990c91494626379cf88e7e157a5bfc37b87c0c83bf7c8 SHA512 cc9475811d3f8265e79c80d2b7b817156942430843d23361c3ea9791730c422acd9c399755c8f6a775b6a3e9d7fb9138f22e87ebde9e7019591d68c696095d81 diff --git a/dev-python/pyaudio/files/pyaudio-0.2.11-python310-size_t.patch b/dev-python/pyaudio/files/pyaudio-0.2.11-python310-size_t.patch new file mode 100644 index 000000000000..445a9b7e9c44 --- /dev/null +++ b/dev-python/pyaudio/files/pyaudio-0.2.11-python310-size_t.patch @@ -0,0 +1,28 @@ +https://git.skeh.site/skeh/pyaudio/commit/2ee560056ec889ea7cd3ce1801b796b0939dd540 +https://bugs.gentoo.org/855626 + +From 2ee560056ec889ea7cd3ce1801b796b0939dd540 Mon Sep 17 00:00:00 2001 +From: Derek Schmidt <skeh@is.nota.live> +Date: Tue, 14 Dec 2021 21:46:11 -0700 +Subject: [PATCH] Use Py_ssize_t for tuple return on stream methods + +--- a/src/_portaudiomodule.c ++++ b/src/_portaudiomodule.c +@@ -25,6 +25,7 @@ + */ + + #include <stdio.h> ++#define PY_SSIZE_T_CLEAN + #include "Python.h" + #include "portaudio.h" + #include "_portaudiomodule.h" +@@ -1291,7 +1292,7 @@ int _stream_callback_cfunction(const void *input, void *output, + PyObject *py_status_flags = PyLong_FromUnsignedLong(statusFlags); + PyObject *py_input_data = Py_None; + const char *pData; +- unsigned output_len; ++ Py_ssize_t output_len; + PyObject *py_result; + + if (input) { + diff --git a/dev-python/pyaudio/pyaudio-0.2.11-r2.ebuild b/dev-python/pyaudio/pyaudio-0.2.11-r2.ebuild new file mode 100644 index 000000000000..b061423018d0 --- /dev/null +++ b/dev-python/pyaudio/pyaudio-0.2.11-r2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit distutils-r1 + +MY_PN="PyAudio" + +DESCRIPTION="Python bindings for PortAudio" +HOMEPAGE="http://people.csail.mit.edu/hubert/pyaudio/" +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz" +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# Tests work if you have the correct HW device(s) to test. 0.2.11-r1. +RESTRICT="test" + +RDEPEND="media-libs/portaudio" +DEPEND="${RDEPEND}" +BDEPEND="test? ( dev-python/numpy[${PYTHON_USEDEP}] )" + +distutils_enable_sphinx sphinx +distutils_enable_tests unittest + +PATCHES=( + "${FILESDIR}"/${PN}-0.2.11-python310-size_t.patch +) + +python_test() { + elog "These tests require an OS loopback sound device that forwards audio" + elog "output, generated by PyAudio for playback, and forwards it to an input" + elog "device, which PyAudio can record and verify against a test signal." + + cd tests || die + # pyaudio_tests have very complicated runtime requirements, therefore skipping them. + "${EPYTHON}" -m unittest error_tests -v || die "Tests fail with ${EPYTHON}" +} |