help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Packaging pulsectl: check phase fails starting/communicating with PulseA


From: Sergiu Ivanov
Subject: Packaging pulsectl: check phase fails starting/communicating with PulseAudio
Date: Sat, 07 Jan 2023 22:21:48 +0100
User-agent: mu4e 1.8.13; emacs 28.2

Hello,

I am trying to update volctl [0]—a GTK package for showing a systray
sound icon—to the latest version.  It used to depend on pulseaudio, but
now it seems to rather rely on pulsectl [1].  So, I am trying to
package pulsectl.

I ran guix import pypi pulsectl, and then adapted the patch phase from
volctl, like this:


(define-public python-pulsectl
  (package
    (name "python-pulsectl")
    (version "22.3.2")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "pulsectl" version))
              (sha256
               (base32
                "115ha1cwpd2r84ssnxdbr59hgs0jbx0lz3xpqli64kmxxqf4w5yc"))))
    (build-system python-build-system)
    (inputs (list pulseaudio))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-path
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((pulse (assoc-ref inputs "pulseaudio")))
               (substitute* "pulsectl/_pulsectl.py"
                 (("libpulse.so.0")
                  (string-append pulse "/lib/libpulse.so.0")))
               #t))))))
    (home-page "https://github.com/mk-fg/python-pulse-control";)
    (synopsis
     "Python bindings for mixer-like controls in PulseAudio")
    (description
     "Python high-level interface and ctypes-based bindings for
PulseAudio (libpulse), to use in simple synchronous code.  This wrapper is
mostly for mixer-like controls and introspection-related operations, as
opposed to e.g. submitting sound samples to play and player-like client.")
    (license license:expat)))


Here is the excerpt of the error output, and I also attach the full
build log:


ERROR
test_crash_after_connect 
(pulsectl.tests.test_with_dummy_instance.PulseCrashTests) ... FAIL
test_reconnect (pulsectl.tests.test_with_dummy_instance.PulseCrashTests) ... 
FAIL

======================================================================
ERROR: setUpClass (pulsectl.tests.test_with_dummy_instance.DummyTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/tmp/guix-build-python-pulsectl-22.3.2.drv-0/pulsectl-22.3.2/pulsectl/tests/test_with_dummy_instance.py",
 line 231, in setUpClass
    cls.instance_info = dummy_pulse_init()
  File 
"/tmp/guix-build-python-pulsectl-22.3.2.drv-0/pulsectl-22.3.2/pulsectl/tests/test_with_dummy_instance.py",
 line 85, in dummy_pulse_init
    try: _dummy_pulse_init(info)
  File 
"/tmp/guix-build-python-pulsectl-22.3.2.drv-0/pulsectl-22.3.2/pulsectl/tests/test_with_dummy_instance.py",
 line 192, in _dummy_pulse_init
    raise AssertionError( 'pulseaudio process'
AssertionError: pulseaudio process failed to start or create native socket at 
/tmp/guix-build-python-pulsectl-22.3.2.drv-0/pulsectl-tests.e7y_i21t/pulse/native


It looks like the check phase fails because it tries to start a dummy
PulseAudio instance, which obviously goes beyond what is allowed in the
build environment.

What would be the canonical way to deal with such an issue?
Should I disable the check phase altogether?  Is there a proper way to
deal with the PulseAudio server in the build environment?

-
Sergiu

[0] https://github.com/buzz/volctl

[1] https://pypi.org/project/pulsectl/

Attachment: vnm4n8ywh60pnifhfb1zp61w52miwn-python-pulsectl-22.3.2.drv.gz
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]