Skip to content
Permalink
Browse files

[PyQt5] make pyuic4-wrapper PyQt5 aware

  • Loading branch information
m-kuhn committed Mar 10, 2016
1 parent aa29370 commit 264527a495b19ba4e16486d4aaeefef34352656d
Showing with 9 additions and 5 deletions.
  1. +1 −1 cmake/PyQtMacros.cmake
  2. +1 −1 scripts/pyuic4-wrapper.bat
  3. +4 −1 scripts/pyuic4-wrapper.py
  4. +3 −2 scripts/pyuic4-wrapper.sh
@@ -45,7 +45,7 @@ MACRO(PYQT_WRAP_UI outfiles )
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.py)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${PYUIC_WRAPPER} "${PYUIC_PROGRAM}" "${PYUIC_WRAPPER_PATH}" "${QGIS_OUTPUT_DIRECTORY}/python" ${infile} -o ${outfile}
COMMAND ${PYUIC_WRAPPER} "${PYUIC_PROGRAM}" "${PYUIC_WRAPPER_PATH}" "${QGIS_OUTPUT_DIRECTORY}/python" "${PYTHON_EXECUTABLE}" ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
DEPENDS pygui pycore
)
@@ -2,4 +2,4 @@
set PYUIC4=%1
set PATH=%2;%PATH%
set PYTHONPATH=%3;%PYTHONPATH%
%PYUIC4% %4 %5 %6 %7 %8 %9
%PYUIC4% %5 %6 %7 %8 %9
@@ -4,4 +4,7 @@
except:
pass

import PyQt4.uic.pyuic
try:
import PyQt4.uic.pyuic
except ImportError:
import PyQt5.uic.pyuic
@@ -3,8 +3,9 @@
PYUIC4=$1
LD_LIBRARY_PATH=$2:$LD_LIBRARY_PATH
PYTHONPATH=$3:$PYTHONPATH
shift 3
PYTHON=$4
shift 4

export LD_LIBRARY_PATH PYTHONPATH

exec python $(dirname $0)/pyuic4-wrapper.py $@
exec $PYTHON $(dirname $0)/pyuic4-wrapper.py $@

0 comments on commit 264527a

Please sign in to comment.
You can’t perform that action at this time.