Package Details: python-rtmixer 0.1.7-2

Git Clone URL: https://aur.archlinux.org/python-rtmixer.git (read-only, click to copy)
Package Base: python-rtmixer
Description: Reliable low-latency audio playback and recording with Python
Upstream URL: https://github.com/spatialaudio/python-rtmixer
Licenses: MIT
Submitter: robertfoster
Maintainer: robertfoster
Last Packager: robertfoster
Votes: 5
Popularity: 0.27
First Submitted: 2019-12-10 19:54 (UTC)
Last Updated: 2024-10-04 12:18 (UTC)

Latest Comments

drws commented on 2024-10-04 15:12 (UTC)

@Stroopwafel: thank you for the explanation and the python-rtmixer-git package.

@T-vK: You could try to extract the portaudio source to the path where it is expected instead of modifying flags.

Stroopwafel commented on 2024-08-10 18:01 (UTC) (edited on 2024-08-10 18:02 (UTC) by Stroopwafel)

The reason it cannot find pa_ringbuffer.c is because portaudio is a submodule of the project. Submodules don't get included in the source code archive in Github.

The way I got around it is by changing the PKGBUILD to be essentially a -git package. Following the AUR guidelines, I've attached a pastebin https://pastebin.com/GPiWCzQT

I don't know how to compute the checksum, so (while it is generally a very bad idea) I installed using --skipchecksums

T-vK commented on 2024-08-08 13:38 (UTC)

Getting the same exact error. Seems like the portaudio package is not providing pa_ringbuffer.c. It does still exist in the git repo though: https://github.com/PortAudio/portaudio/tree/master/src/commonpa_ringbuffer.c.

I've tried to modify the PKGBUILD to download the missing files and point gcc to it via CFLAGS, but for some reason gcc still can't find the files:

# Maintainer: robertfoster

pkgname=python-rtmixer
pkgver=0.1.7
pkgrel=1
pkgdesc="Reliable low-latency audio playback and recording with Python"
arch=(any)
url="https://github.com/spatialaudio/python-rtmixer"
license=('MIT')
makedepends=(portaudio python-build python-cffi python-installer python-pa-ringbuffer python-setuptools python-wheel)
source=("https://github.com/spatialaudio/python-rtmixer/archive/${pkgver}.tar.gz"
        "https://github.com/PortAudio/portaudio/archive/refs/tags/v19.7.0.zip")
sha256sums=('17cc6798a56278b5d74a07a9f607093089ab1b3fcfbaecaafb30659100935cc1'
            'ce1e7b27ad362cb9745de7da3d266a996b085ca75a12ac62c881f88ab6894acf')

prepare() {
  cd "$srcdir"

  # Extract the PortAudio source from the downloaded ZIP
  unzip v19.7.0.zip -d portaudio
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # Set CFLAGS to include the portaudio headers and common directory
  export CFLAGS="$CFLAGS -I${srcdir}/portaudio/portaudio-19.7.0/src/common"

  # Build the package
  python -m build --wheel --no-isolation
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  python -m installer --destdir="$pkgdir" dist/*.whl
}

joshmaybal commented on 2024-07-31 16:02 (UTC)

can't build due to cc1: fatal error: portaudio/src/common/pa_ringbuffer.c: No such file or directory the log is the same with the rentry.co link.

aljustiet commented on 2024-07-28 14:52 (UTC)

https://rentry.co/8v4q6ha2

ax34 commented on 2021-08-06 23:04 (UTC)

Please add python-pip to makedepends

ax34 commented on 2021-07-31 23:07 (UTC)

==> Starting build()...
WARNING: The wheel package is not available.
/usr/bin/python: No module named pip
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmputdvmf0u', '--quiet', 'pa_ringbuffer']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/tmp/makepkg/python-rtmixer/src/python-rtmixer-0.1.3/setup.py", line 11, in <module>
    setup(
  File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 785, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
    dist = best[req.key] = env.best_match(
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
    return installer(requirement)
  File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 844, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmputdvmf0u', '--quiet', 'pa_ringbuffer']' returned non-zero exit status 1.
==> ERROR: A failure occurred in build().

BifbofII commented on 2020-03-11 09:10 (UTC)

It seems to me like portaudio is missing as a build dependency for this package. When I try to build this in a chroot, it fails with the following error:

build/temp.linux-x86_64-3.8/_rtmixer.c:569:10: fatal error: portaudio.h: No such file or directory
  569 | #include <portaudio.h>
      |   

Diff to fix this issue:

diff --git a/PKGBUILD b/PKGBUILD
index 8a34a6a..9267060 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ pkgdesc="Reliable low-latency audio playback and recording with Python"
 arch=(any)
 url="https://github.com/spatialaudio/python-rtmixer"
 license=('MIT')
-makedepends=('python-cffi' 'python-setuptools')
+makedepends=('python-cffi' 'python-setuptools' 'portaudio')
 source=("https://github.com/spatialaudio/python-rtmixer/archive/$pkgver.tar.gz"
     "pa_ringbuffer.c::https://app.assembla.com/spaces/portaudio/git/source/master/src/common/pa_ringbuffer.c?_format=raw"
     "pa_ringbuffer.h::https://app.assembla.com/spaces/portaudio/git/source/master/src/common/pa_ringbuffer.h?_format=raw"