Skip to content

Use sip-build and python3_add_library for Qt5/Qt6#157

Open
sloretz wants to merge 9 commits intorollingfrom
sloretz__use_sip_build_qt5_qt6
Open

Use sip-build and python3_add_library for Qt5/Qt6#157
sloretz wants to merge 9 commits intorollingfrom
sloretz__use_sip_build_qt5_qt6

Conversation

@sloretz
Copy link
Contributor

@sloretz sloretz commented Mar 17, 2026

I'm playing around with an alternative to #143.
Requires ros/rosdistro#50338

If I understand correctly, and I'm not sure that I do, python_qt_binding uses a Python script sip_configure.py to produce a Makefile that produces a cPython extension.

#143 uses sip-build, but sets it up to use pip install to generate the bindings. It ends up creating a separate function build_sip_6_binding to use this new approach with a configurable pyproject.toml.in template downstream in qt_gui_core.

This PR uses sip-build and the CMake function python3_add_library to build a cPython extension instead. This PR allows using sip-build on both Qt5 and Qt6 bindings, though right now I've only tested it with Qt5 on Noble. I'll need to update the Python code like @ahcorde has in #143 to import from PyQt6.

I used Gemini 3.1 Pro to help make this PR

Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
@sloretz sloretz self-assigned this Mar 17, 2026
Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
@sloretz
Copy link
Contributor Author

sloretz commented Mar 18, 2026

After looking into this a bit, this is too much to pursue right now. I'm going to close this for now. Nevermind, realized what I was doing wrong

@sloretz sloretz closed this Mar 18, 2026
@sloretz sloretz reopened this Mar 19, 2026
sloretz added 6 commits March 20, 2026 00:13
Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
@sloretz sloretz changed the title Try using sip-build and Python3_add_library for Qt5/Qt6 Use sip-build and python3_add_library for Qt5/Qt6 Mar 21, 2026
Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
@sloretz sloretz marked this pull request as ready for review March 21, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant