#1134169 python3-libcec: Build installs only some of the files, outside default PYTHON_PATH

Package:
python3-libcec
Source:
python3-libcec
Description:
Python bindings for libCEC
Submitter:
Paul Martin
Date:
2026-04-17 10:03:02 UTC
Severity:
normal
Tags:
#1134169#5
Date:
2026-04-17 09:27:54 UTC
From:
To:
The current package build installs these files:

    /usr/bin/pyCecClient
    /usr/lib
    /usr/lib/x86_64-linux-gnu
    /usr/lib/x86_64-linux-gnu/python3.13
    /usr/lib/x86_64-linux-gnu/python3.13/dist-packages
    /usr/lib/x86_64-linux-gnu/python3.13/dist-packages/cec.py

However...

    /usr/lib/x86_64-linux-gnu/python3.13/dist-packages

isn't on the standard PYTHON_PATH (use `python -m site` to show yours),
which is currently:

    $(cwd),
    '/usr/lib/python313.zip',
    '/usr/lib/python3.13',
    '/usr/lib/python3.13/lib-dynload',
    '/usr/local/lib/python3.13/dist-packages',
    '/usr/lib/python3/dist-packages',

And no other package seems to install into
/usr/lib/x86_64-linux-gnu/python3.13/dist-packages

Also, there's a missing binary which is loaded by the module. I've
cobbled together the following working but non-optimal install by
changing debian/python3-libcec.install to:

    usr/lib/*/python3.*/dist-packages/* usr/lib/python3/dist-packages/
    usr/bin/pyCecClient

which installs:

    /usr/lib/python3/dist-packages
    /usr/lib/python3/dist-packages/_pycec.so
    /usr/lib/python3/dist-packages/cec.py

However, it probably should install into
/usr/lib/python3/dist-packages/cec/ as the included script (pyCecClient)
loads the module using

    from cec import cec

Also, the libcec build script doesn't add the arch component to the
python .so component.  The current convention seems to be that it should
be named

   _pycec.cpython-313-x86_64-linux-gnu.so
   _pycec.cpython-313-aarch64-linux-gnu.so

on x86_64 and aarch64 respectively.

The install logic appears to be near the end of

   src/libcec/cmake/CheckPlatformSupport.cmake