Skip to content

Commit 5c78b64

Browse files
committed
Update dobuild.py
1 parent c672001 commit 5c78b64

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

scripts/dobuild.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424
pyDir = f"C:/hostedtoolcache/windows/Python/{pythonversion}/{arch}"
2525
pyPath = f"{pyDir}/python.exe"
2626
Qtinstallpath = f"D:/a/PyElaWidgetTools/Qt/{qtversion}/{qtarchdir}"
27+
qmake = f"{Qtinstallpath}/bin/qmake.exe"
2728
elif sys.platform == "linux":
2829
pyPathEx = f"/opt/hostedtoolcache/Python/3.12.10/x64/bin/python"
2930
pyDir = f"/opt/hostedtoolcache/Python/{pythonversion}/{arch}/bin/python"
3031
pyPath = f"{pyDir}/python.exe"
3132
Qtinstallpath = f"/home/runner/work/PyElaWidgetTools/Qt/{qtversion}/{qtarchdir}"
33+
qmake = f"{Qtinstallpath}/bin/qmake"
3234

3335
subprocess.run(f"{pyPath} -m pip install --upgrade pip")
3436
if binding.lower().startswith("pyqt"):
@@ -85,10 +87,6 @@ def __parsefile(fn, cb):
8587
subprocess.run(f'python gen_widgets.py {int(qtversion.startswith("5"))}')
8688
subprocess.run(f'python gen_pyi_from_sip.py {int(qtversion.startswith("5"))}')
8789
subprocess.run(f"{pyPath} sip_code_fix.py")
88-
if sys.platform == "win32":
89-
qmake = f"{Qtinstallpath}/bin/qmake.exe"
90-
else:
91-
qmake = f"{Qtinstallpath}/bin/qmake"
9290

9391
subprocess.run(
9492
rf"{pyDir}/Scripts/sip-build --verbose --qmake {qmake}"
@@ -123,7 +121,7 @@ def __parsefile(fn, cb):
123121
)
124122

125123
subprocess.run(
126-
f'cmake -DMY_QT_INSTALL={Qtinstallpath} -DMY_PYTHON_INSTALL_PATH={pyDir.replace("\\", "/")} -DELA_LIB_PATH={os.path.abspath("../ElaWidgetTools/Release/ElaWidgetTools.lib").replace("\\", "/")} -DELA_INCLUDE_PATH={os.path.abspath("../../ElaWidgetTools/ElaWidgetTools").replace("\\", "/")} ./CMakeLists.txt {flags}'
124+
f'cmake -DMY_QT_INSTALL={Qtinstallpath} -DMY_PYTHON_INSTALL_PATH={pyDir} -DELA_LIB_PATH={os.path.abspath("../ElaWidgetTools/Release/ElaWidgetTools.lib").replace("\\", "/")} -DELA_INCLUDE_PATH={os.path.abspath("../../ElaWidgetTools/ElaWidgetTools").replace("\\", "/")} ./CMakeLists.txt {flags}'
127125
)
128126
subprocess.run(
129127
f"cmake --build ./ --config Release --target ALL_BUILD -j {os.cpu_count()}"

0 commit comments

Comments
 (0)