python-libcec installs to /usr/lib/python2.7.15rc1/dist-packages which isn't on python import path

Bug #1822066 reported by David Röthlisberger on 2019-03-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libcec (Ubuntu)
Undecided
Unassigned

Bug Description

python-libcec installs to /usr/lib/python2.7.15rc1/dist-packages.
It should be /usr/lib/python2.7/dist-packages.
The latter is on python's default import search path, the former is not.

    $ lsb_release -rd
    Description: Ubuntu 18.04.2 LTS
    Release: 18.04

    $ apt-cache policy python-libcec
    python-libcec:
      Installed: 4.0.2+dfsg1-2ubuntu1.1
      Candidate: 4.0.2+dfsg1-2ubuntu1.1
      Version table:
     *** 4.0.2+dfsg1-2ubuntu1.1 500
            500 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
            100 /var/lib/dpkg/status
         4.0.2+dfsg1-2ubuntu1 500
            500 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

    $ dpkg -L python-libcec
    [...]
    /usr/lib/python2.7.15rc1/dist-packages/cec
    /usr/lib/python2.7.15rc1/dist-packages/cec/__init__.py
    /usr/lib/python2.7.15rc1/dist-packages/cec/_cec.so

    $ python
    >>> import cec
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named cec
    >>> import sys; print sys.path
    ['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']

This is the only thing installed in /usr/lib/python2.7.15rc1:

    $ ls /usr/lib/python2.7.15rc1/dist-packages/
    cec/

David Röthlisberger (drothlis) wrote :

This doesn't affect 16.04.
It does affect 18.04 and 18.10.

David Röthlisberger (drothlis) wrote :

Note that there's a different bug that also prevents you from importing `cec`:
https://bugs.launchpad.net/ubuntu/+source/libcec/+bug/1805620

But this one is newer, I suppose it was introduced in the 7 Feb 2019 rebuild:

> libcec (4.0.2+dfsg1-2ubuntu1.1) bionic-proposed; urgency=medium
>
> * SRU: LP: #1815080.
> * Add more template symbols to the symbols file (generated by GCC 7.4),
> and mark them as optional.
>
> -- Matthias Klose <email address hidden> Thu, 07 Feb 2019 17:35:59 +0100
>
> libcec (4.0.2+dfsg1-2ubuntu1) bionic; urgency=medium
>
> * debian/python-libcec.install: python build systems now correctly install
> the modules to dist-packages, so don't try to move the module in the
> dh_install phase.
>
> -- Steve Langasek <email address hidden> Tue, 20 Mar 2018 13:48:02 -0700

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers