Skip to content

Commit

Permalink
Fix PyQt debug build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jun 13, 2024
1 parent 74f8ea9 commit 1e4f026
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions src/tasks/pyqt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ namespace mob::tasks {
.env(pyqt_env);

if (build_type() == config::debug) {
p.arg("--debug");
p.arg("--debug")
// the distinfo generation currently fails with debug mode
.arg("--no-distinfo");
}

// build modules
Expand Down Expand Up @@ -272,9 +274,30 @@ namespace mob::tasks {
cx().trace(context::bypass, "pyqt already installed");
}
else {
// run `pip install` on the generated PyQt6_sip-XX.tar.gz file
run_tool(
pip(pip::install).file(conf().path().cache() / sip_install_file()));
if (python::build_type() == config::debug) {

const auto pyqt_sip_folder = source_path() / "PyQt6_sip" /
("pyqt6_sip-" + sip::version_for_pyqt());

// in debug, we need to do stuff manually because pip does not work
// as expected
run_tool(extractor()
.file(conf().path().cache() / sip_install_file())
.output(pyqt_sip_folder.parent_path()));

run_tool(mob::python()
.root(pyqt_sip_folder)
.arg("setup.py")
.arg("build")
.arg("--debug"));

run_tool(pip(pip::install).file(pyqt_sip_folder));
}
else {
// run `pip install` on the generated PyQt6_sip-XX.tar.gz file
run_tool(
pip(pip::install).file(conf().path().cache() / sip_install_file()));
}

// done, create the bypass file
installed_bypass.create();
Expand Down

0 comments on commit 1e4f026

Please sign in to comment.