Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cura 8640 PyQt6 upgrade #41

Merged
merged 29 commits into from
Apr 14, 2022
Merged

Cura 8640 PyQt6 upgrade #41

merged 29 commits into from
Apr 14, 2022

Conversation

jellespijker
Copy link
Member

@jellespijker jellespijker commented Apr 12, 2022

Because we are switching to Qt6 we also needed to update SIP to 5.0+
SIP5+ builds en generate the code using a new process and executable. We had a lot of trouble linking the sip generated binaries on all three systems using the QGIS CMake Macro's so we decided to let sip only generate the C++ source code from the sip files and leave compiling and linking in the CMake domain. This is achieved by using our own CMakebuilder.py which is then used by sip-build instead of its shipped builder. This Cmakebuilder is basically the same in every respect except the call to the build function has been removed.

Make sure that sip-build is installed and that it is added to the PYTHONPATH

In order to get this to work on our build-system and working for all three OSes we did a shit tons of boy scouting in our cmake. We removed old methods with variables and try to be consisted in a target-based approach. The idea is that we don't patch stuff down the line, but that the install should place everything with desired rpaths for each project.

There were also some changes needed in the namespace when using enums and the created Python module is called pySavitar. This was needed to ensure no naming conflicts downstream.

Part of

Fixes

Todo

  • Update Readme. But maybe best done in a separate ticket to prioritize with our other work for the 5.0 release
  • Fix failing CI/CT due to out date build environment. I think it will be best if we fix this in a separate ticket.

j.spijker@ultimaker.com and others added 20 commits February 25, 2022 09:43
This ports the CMake build logic. It won't compile yet because
We also need to change some code in the sip definition files.

Contributes to CURA-7924
A convenience function which outputs a compile_commands.json
showing the used compile commands. Helpful for CMake debugging.

Contributes to CURA-7924
Co-authored-by: rburema <r.burema@ultimaker.com>

Sip 6.5.0 uses different methods and types.

Contributes to CURA-7924
- Set SIP_BUILD_EXECUTABLE from Script
- Set extension of module depending on OS

Contributes to CURA-7924
These CMake functions ensure that properties such
as rpaths and threading etc are set correctly.

Contributes to CURA-8640
Although not needed at run-time, it is needed for freeze time,
such that cx-freeze can find it.

Contributes to CURA-8640
Contributes to CURA-8640
../lib is an symlink to ../Resources/lib/

Contributes to CURA-8640
Contributes to CURA-8640
Otherwise, fall back to FindPython.

Contributes to issue CURA-8640.
Contributes to issue CURA-8640.
Contributes to CURA-8640
Don't rebuild when installing

Contributes to CURA-8640
This should already be taken care of by target_include_dir

Contributes to CURA-8640
Already handled by the use_threads function

Contributes to CURA-8640
CMakeLists.txt Outdated Show resolved Hide resolved
cmake/StandardProjectSettings.cmake Outdated Show resolved Hide resolved
cmake/StandardProjectSettings.cmake Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
cmake/FindSIP.py Show resolved Hide resolved
jellespijker and others added 6 commits April 13, 2022 11:31
Contributes to CURA-8640
BUILD_SHARED_LIBS is a global CMake option, while BUILD_STATIC our own
custom option.

Contributes to CURA-8640
Contributes to CURA-8640
Already done by the StandardProjectSettings.cmake

Contributes to CURA-8640
Added comment

Contributes to CURA-8640
j.spijker@ultimaker.com added 3 commits April 14, 2022 11:45
Contributes to CURA-8640
@Ghostkeeper Ghostkeeper merged commit c66d04c into 5.0 Apr 14, 2022
@rburema rburema deleted the CURA-8640_PyQt6_upgrade branch April 28, 2022 12:03
@rburema rburema restored the CURA-8640_PyQt6_upgrade branch April 28, 2022 12:04
@jellespijker jellespijker deleted the CURA-8640_PyQt6_upgrade branch July 11, 2022 09:24
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.

Update to SIP5
3 participants