void-packages/srcpkgs/pyside2-tools/patches/tests-use-qt5-rcc-and-uic.p...

35 lines
1.5 KiB
Diff

--- sources/pyside2-tools/tests/CMakeLists.txt
+++ sources/pyside2-tools/tests/CMakeLists.txt
@@ -1,4 +1,11 @@
+
+# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc,
+# with '-g python' option
+
+FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic)
+FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc)
+
add_subdirectory(rcc)
-add_test(QWizard ${SHIBOKEN_PYTHON_INTERPRETER} ${CMAKE_SOURCE_DIR}/pyside2-uic "${CMAKE_CURRENT_SOURCE_DIR}/qwizard_test.ui")
+add_test(QWizard ${PYSIDE2UICBINARY} --generator=python "${CMAKE_CURRENT_SOURCE_DIR}/qwizard_test.ui")
set_tests_properties(QWizard PROPERTIES
ENVIRONMENT "PYTHONPATH=$ENV{PYTHONPATH}:${CMAKE_SOURCE_DIR}:${CMAKE_CURRENT_SOURCE_DIR}")
--- sources/pyside2-tools/tests/rcc/CMakeLists.txt
+++ sources/pyside2-tools/tests/rcc/CMakeLists.txt
@@ -1,6 +1,6 @@
macro(ADD_RCC_TEST name pyfile qrcfile)
add_test(${name} ${CMAKE_CURRENT_SOURCE_DIR}/run_test.sh
- ${PYSIDERCC_EXECUTABLE}
+ ${PYSIDE2RCCBINARY}
${CMAKE_CURRENT_SOURCE_DIR}/${pyfile}
${CMAKE_CURRENT_SOURCE_DIR}/${qrcfile}
${CMAKE_CURRENT_SOURCE_DIR})
--- sources/pyside2-tools/tests/rcc/run_test.sh
+++ sources/pyside2-tools/tests/rcc/run_test.sh
@@ -8,5 +8,5 @@
# $3: qrc file
export PYTHONPATH=$PYTHONPATH:`pwd`
-$1 -o `basename $3 .qrc`_rc.py $3
+$1 --generator=python -o `basename $3 .qrc`_rc.py $3
`pkg-config shiboken2 --variable=python_interpreter` $2