unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Sergiu Ivanov <sivanov@colimite.fr>
To: help-guix <help-guix@gnu.org>
Subject: Packaging pulsectl: check phase fails starting/communicating with PulseAudio
Date: Sat, 07 Jan 2023 22:21:48 +0100	[thread overview]
Message-ID: <87wn5y3pgh.fsf@colimite.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 3327 bytes --]

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 #2: vnm4n8ywh60pnifhfb1zp61w52miwn-python-pulsectl-22.3.2.drv.gz --]
[-- Type: application/octet-stream, Size: 3161 bytes --]

                 reply	other threads:[~2023-01-07 23:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wn5y3pgh.fsf@colimite.fr \
    --to=sivanov@colimite.fr \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).