🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Sebastian Ramacher Wed, 07 Oct 2026 19:50
Bug#1144979: ITP: python-discid -- Python binding of Libdiscid
#81
Author: Sebastian Ramacher
Date: Wed, 07 Oct 2026 19:50
49 lines
3585 bytes
Hi Aryan

On 2026-10-07 09:35:00 +0530, Aryan Karamtoth wrote:
> > Note that we already have python-libdiscid (which builds an
> extension module linking against libdiscid0 instead of using ctypes) in
> the archive which has a compat interface for python-discid. See [1] and
> [2]how this can be integrated.
> 
> Hi Sebastian,
> 
> python-discid is an official wrapper library from MusicBrainz, the
> developers of libdiscid. I've also seen someone who had to rewrite their
> software to make use of python-libdiscid because python-discid wasn't
> available in the archive at that time [1].
> 
> Also, I'm packaging this for laser and I tried to see if I could integrate
> the existing python-libdiscid functionality to it but laser uses some
> functions that are specific to python-discid. Integrating python-libdiscid
> into laser would require me to rewrite a large amount of code and maintain
> it but packaging python-discid would be a lot easier and would also benefit
> other users and software that wants to use this version of the library.

I am not sure which functions you are referring to. The compat module of
python_libdiscid provides everything from discid. In any case, the
following patch works for laser:

diff --git a/src/metadata.py b/src/metadata.py
index 82c30de..561dea5 100644
--- a/src/metadata.py
+++ b/src/metadata.py
@@ -2,7 +2,10 @@ import os
 import re
 import asyncio
 
-import discid
+try:
+    from libdiscid.compat import discid
+except ImportError:
+    import discid
 import cdio
 import pycdio
 import musicbrainzngs

FWIW, the laser package on salsa is at least missing a dependency on
python3-cdio.

Cheers
-- 
Sebastian Ramacher
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads