Skip to content

Location of sip files may be different based on distro/python version #80

Closed

Description

@jwhendy

Greetings,

Would you be able to take a look at this comment on this issue? We ran into a snag on arch linux with the code in sip_configure.py.

Compiling ros-melodic-rviz failed when trying to find the sip PyQt5 bindings, and installing the python2 variant of the package was a successful workaround. We've been updating everything to python3, so I looked into what was going on, as we don't really want to keep a package on python2 as a solution.

It looks like the file location for sip files changes. If you go to each of these, scroll down, and click "view the file list", you'll see the difference:

  • python2-pyqt5: usr/share/sip/PyQt5/
  • python-pyqt5: usr/lib/python3.8/site-packages/PyQt5/bindings

In searching for the latter directory via google, I only get hits for arch linux. I'm not familiar with pyqt5 or sip; do you know where I could check the canonical install directory? I'm thinking either:

  • the directory is changing in the future and it might be good for this package to accommodate, or
  • something is awry with arch's package and we should change our install dir accordingly.

Activity

  1. dirk-thomas commented on Jan 3, 2020

    @dirk-thomas
    Contributor

    I don't know to what there packages equate on Ubuntu. The two Ubuntu packages python-pyqt5 and python3-pyqt5 seem to use the same (beside Python version) locations for the files.

    The file QtCoremod.sip is part of the Ubuntu package pyqt5-dev which is not Python version specific.

    Maybe you can provide more details what exact file your are looking for and which Ubuntu package provides them in what location.

  2. antonio-rojas commented on Jan 3, 2020

    @antonio-rojas

    The sip bindings location depends on the sip version used to compile pyqt. As distributions start moving to sip 5, they will start using the latter location.

  3. jwhendy commented on Jan 3, 2020

    @jwhendy
    Author

    I think this issue is that it can't find the root directory for any sip bindings. I don't have my build output up any longer, but don't recall a specific file it failed to find. To my memory, my output looked like this replicator's output (hence starting the debug there):

    Traceback (most recent call last):
      File "/opt/ros/melodic/share/python_qt_binding/cmake/sip_configure.py", line 50, in get_sip_dir_flags
        sip_dir = config.pyqt_sip_dir
      File "/usr/lib/python3.8/site-packages/sipconfig.py", line 192, in __getattr__
        raise AttributeError("\"%s\" is not a valid configuration value or user option" % name)
    AttributeError: "pyqt_sip_dir" is not a valid configuration value or user option
    

    I was looking for other distro locations for these files as well, thinking perhaps it was a python3.8 change. I found the same package on Ubuntu (and no python3 specific variant), then gave up and searched directly for /usr/lib/python3.8/site-packages/PyQt5/bindings and only got arch linux hits.

    I think I've framed this question accurately: is /usr/lib/python3.x/site-packages/PyQt5/bindings a location that needs to be accounted for? I don't know how to answer this, and so far the data only suggests "arch is using a different place than Ubuntu," not why.

    I posted here, as perhaps someone might understand why the get_sip_dir_flags() function is not working and/or where to check if a change is coming via sip/python3.8. I also just created a bug on the arch package to see if the maintainers can illuminate us.


    Edit: @antonio-rojas posted while I was writing this which might get at:

    ...where to check if a change is coming via sip

    @antonio-rojas could you post a link to this information? arch is currently on 4.19.20.

  4. antonio-rojas commented on Jan 3, 2020

    @antonio-rojas

    I don't think this is documented anywhere other than the source code. Arch ships both sip 4 and sip 5. All python 3 bindings are built with sip 5.

  5. eli-schwartz commented on Jan 3, 2020

    @eli-schwartz

    One of my packages uses sip to build, and upstream adapted to sip5 with the following commit: kovidgoyal/calibre@5ef79c7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions