diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a05ce0fab..fd1cc4e7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -128,6 +128,45 @@ jobs: path: generated_cpp if-no-files-found: error + altlinux: + runs-on: ubuntu-latest + container: altlinux/base:latest + steps: + - name: Install Qt + run: | + apt-get update && apt-get install -y \ + gcc-c++ \ + python3-dev \ + libpython3 \ + qt5-base-devel \ + qt5-tools-devel \ + qt5-declarative-devel \ + qt5-svg-devel \ + qt5-multimedia-devel \ + qt5-xmlpatterns-devel \ + qt5-multimedia-devel \ + qt5-quick1-devel \ + qt5-script-devel \ + qt5-3d-devel \ + make + apt-get clean + + - name: Checkout PythonQt + uses: actions/checkout@v3 + + - name: Build PythonQt + run: | + export QT_SELECT=qt5 + echo ======= SYSTEM INFO ======== + uname -a; gcc --version | grep "gcc"; python3 --version; qmake-qt5 --version + echo ============================ + export PYTHON_VERSION_SHORT=`python3 --version | cut -d " " -f 2 | cut -d "." -f1,2` + qmake-qt5 -r PythonQt.pro CONFIG+=release \ + "PYTHON_VERSION=${PYTHON_VERSION_SHORT}" PYTHON_DIR="/usr" + make -j $(nproc) && \ + PYTHONDEVMODE=1 PYTHONASYNCIODEBUG=1 PYTHONWARNINGS=error PYTHONMALLOC=malloc_debug \ + make check TESTARGS="-platform minimal" + oldschool: strategy: fail-fast: false diff --git a/build/PythonQt.prf b/build/PythonQt.prf index 208c10742..df910f0f7 100644 --- a/build/PythonQt.prf +++ b/build/PythonQt.prf @@ -11,8 +11,10 @@ CONFIG(debug, debug|release) { DEBUG_EXT = } -PYTHONQT_LIB_NAME=PythonQt-Qt$${QT_MAJOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT} +message("TRY READ DESTDIR: $$DESTDIR") +!isEmpty(DESTDIR) { + LIBS += -L$$DESTDIR + QMAKE_RPATHDIR += $$DESTDIR +} -win32-g++: LIBS += $$DESTDIR/../lib/$${PYTHONQT_LIB_NAME}.dll -win32-*msvc*: LIBS += $$DESTDIR/../lib/$${PYTHONQT_LIB_NAME}.lib -unix: LIBS += -L$$DESTDIR/../lib -l$${PYTHONQT_LIB_NAME} +LIBS += -ltrikPythonQt-Qt$${QT_MAJOR_VERSION}$${QT_MINOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT} diff --git a/build/PythonQt_QtAll.prf b/build/PythonQt_QtAll.prf index dffc4806d..2f86c4912 100644 --- a/build/PythonQt_QtAll.prf +++ b/build/PythonQt_QtAll.prf @@ -1,5 +1,6 @@ # profile for non-mevis users to link to PythonQt_QtAll +include(../build/PythonQt.prf) INCLUDEPATH += $$PWD/../extensions/PythonQt_QtAll # check if debug or release @@ -9,7 +10,4 @@ CONFIG(debug, debug|release) { DEBUG_EXT = } - -win32-g++: LIBS += $$DESTDIR/../lib/PythonQt_QtAll-Qt$${QT_MAJOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT}.dll -win32-msvc*: LIBS += $$DESTDIR/../lib/PythonQt_QtAll-Qt$${QT_MAJOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT}.lib -unix: LIBS += -L$$DESTDIR/../lib -lPythonQt_QtAll-Qt$${QT_MAJOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT} \ No newline at end of file +LIBS += -ltrikPythonQt_QtAll-Qt$${QT_MAJOR_VERSION}$${QT_MINOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT} \ No newline at end of file diff --git a/build/common.prf b/build/common.prf index 90a845f48..adb11819f 100644 --- a/build/common.prf +++ b/build/common.prf @@ -17,6 +17,11 @@ CONFIG(debug, debug|release) { TARGET = $${TARGET}_d } +isEmpty(DESTDIR) { + isEmpty(GLOBAL_DESTDIR): DESTDIR = $$PWD/../bin + !isEmpty(GLOBAL_DESTDIR): DESTDIR = $$GLOBAL_DESTDIR +} + # Allow override (e.g., qmake PYTHONQT_GENERATED_PATH=/abs/path) isEmpty(PYTHONQT_GENERATED_PATH) { PYTHONQT_GENERATED_PATH = $$PWD/../generated_cpp diff --git a/examples/CPPPyWrapperExample/CPPPyWrapperExample.pro b/examples/CPPPyWrapperExample/CPPPyWrapperExample.pro index 164349955..ea53718b0 100644 --- a/examples/CPPPyWrapperExample/CPPPyWrapperExample.pro +++ b/examples/CPPPyWrapperExample/CPPPyWrapperExample.pro @@ -4,8 +4,6 @@ TEMPLATE = app mac:CONFIG -= app_bundle -DESTDIR = ../../lib - include ( ../../build/common.prf ) include ( ../../build/PythonQt.prf ) diff --git a/examples/PyCPPWrapperExample/PyCPPWrapperExample.pro b/examples/PyCPPWrapperExample/PyCPPWrapperExample.pro index 7ada73196..72261be1e 100644 --- a/examples/PyCPPWrapperExample/PyCPPWrapperExample.pro +++ b/examples/PyCPPWrapperExample/PyCPPWrapperExample.pro @@ -7,8 +7,6 @@ TARGET = PyCPPWrapperExample TEMPLATE = app -DESTDIR = ../../lib - include ( ../../build/common.prf ) include ( ../../build/PythonQt.prf ) diff --git a/examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.pro b/examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.pro index 952449f5a..4f061358c 100644 --- a/examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.pro +++ b/examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.pro @@ -7,8 +7,6 @@ TARGET = PyCustomMetaTypeExample TEMPLATE = app -DESTDIR = ../../lib - include ( ../../build/common.prf ) include ( ../../build/PythonQt.prf ) diff --git a/examples/PyDecoratorsExample/PyDecoratorsExample.pro b/examples/PyDecoratorsExample/PyDecoratorsExample.pro index 06bb8de4d..a92948f7b 100644 --- a/examples/PyDecoratorsExample/PyDecoratorsExample.pro +++ b/examples/PyDecoratorsExample/PyDecoratorsExample.pro @@ -7,8 +7,6 @@ TARGET = PyDecoratorsExample TEMPLATE = app -DESTDIR = ../../lib - include ( ../../build/common.prf ) include ( ../../build/PythonQt.prf ) diff --git a/examples/PyGettingStarted/PyGettingStarted.pro b/examples/PyGettingStarted/PyGettingStarted.pro index bf1d4d050..b255fe1bb 100644 --- a/examples/PyGettingStarted/PyGettingStarted.pro +++ b/examples/PyGettingStarted/PyGettingStarted.pro @@ -7,8 +7,6 @@ TARGET = PyGettingStarted TEMPLATE = app -DESTDIR = ../../lib - CONFIG += console include ( ../../build/common.prf ) diff --git a/examples/PyGuiExample/PyGuiExample.pro b/examples/PyGuiExample/PyGuiExample.pro index bd200da05..f8199b302 100644 --- a/examples/PyGuiExample/PyGuiExample.pro +++ b/examples/PyGuiExample/PyGuiExample.pro @@ -9,8 +9,6 @@ TEMPLATE = app mac:CONFIG -= app_bundle -DESTDIR = ../../lib - QT += widgets include ( ../../build/common.prf ) diff --git a/examples/PyLauncher/PyLauncher.pro b/examples/PyLauncher/PyLauncher.pro index e8b9686b1..ebd5c25a7 100644 --- a/examples/PyLauncher/PyLauncher.pro +++ b/examples/PyLauncher/PyLauncher.pro @@ -9,8 +9,6 @@ TEMPLATE = app mac:CONFIG -= app_bundle -DESTDIR = ../../lib - QT += widgets include ( ../../build/common.prf ) diff --git a/examples/PyScriptingConsole/PyScriptingConsole.pro b/examples/PyScriptingConsole/PyScriptingConsole.pro index b2b7b5115..015f6c619 100644 --- a/examples/PyScriptingConsole/PyScriptingConsole.pro +++ b/examples/PyScriptingConsole/PyScriptingConsole.pro @@ -7,8 +7,6 @@ TARGET = PyScriptingConsole TEMPLATE = app -DESTDIR = ../../lib - mac:CONFIG-= app_bundle include ( ../../build/common.prf ) diff --git a/extensions/PythonQt_QtAll/PythonQt_QtAll.pro b/extensions/PythonQt_QtAll/PythonQt_QtAll.pro index 39293951d..1b7090f07 100644 --- a/extensions/PythonQt_QtAll/PythonQt_QtAll.pro +++ b/extensions/PythonQt_QtAll/PythonQt_QtAll.pro @@ -30,15 +30,13 @@ isEmpty( PYTHONQTALL_CONFIG ) { eval(CONFIG += $${PYTHONQTALL_CONFIG}) } -TARGET = PythonQt_QtAll-Qt$${QT_MAJOR_VERSION}-PythonXY +TARGET = trikPythonQt_QtAll-QtXY-PythonXY TEMPLATE = lib -DESTDIR = ../../lib - include ( ../../build/common.prf ) include ( ../../build/PythonQt.prf ) TARGET = $$replace(TARGET, PythonXY, Python$${PYTHON_VERSION}) - +TARGET = $$replace(TARGET, QtXY, Qt$${QT_MAJOR_VERSION}$${QT_MINOR_VERSION}) CONFIG += qt strict_c++ msvc_mp !static:!staticlib { diff --git a/generator/generator.pri b/generator/generator.pri index c7d58552e..68a34e3f8 100644 --- a/generator/generator.pri +++ b/generator/generator.pri @@ -18,7 +18,7 @@ include($$GENERATORPATH/parser/rxx.pri) include($$GENERATORPATH/simplecpp/simplecpp.pri) -CONFIG += strict_c++ +CONFIG += qt strict_c++ win32-msvc*{ #Disable warning C4996 (deprecated declarations) QMAKE_CXXFLAGS += -wd4996 diff --git a/src/src.pro b/src/src.pro index bba84356c..45cfb9254 100644 --- a/src/src.pro +++ b/src/src.pro @@ -4,11 +4,9 @@ # $Source$ # -------------------------------------------------- -TARGET = PythonQt-Qt$${QT_MAJOR_VERSION}-PythonXY +TARGET = trikPythonQt-QtXY-PythonXY TEMPLATE = lib -DESTDIR = ../lib - CONFIG += qt msvc_mp CONFIG -= flat @@ -38,6 +36,7 @@ macx { include ( ../build/common.prf ) include ( ../build/python.prf ) TARGET = $$replace(TARGET, PythonXY, Python$${PYTHON_VERSION}) +TARGET = $$replace(TARGET, QtXY, Qt$${QT_MAJOR_VERSION}$${QT_MINOR_VERSION}) include ( src.pri ) diff --git a/tests/tests.pro b/tests/tests.pro index 90a72ce07..2fc231a85 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -6,11 +6,9 @@ TARGET = PythonQtTest TEMPLATE = app -DESTDIR = ../lib QMAKE_RPATHDIR += $$DESTDIR - QT += testlib -CONFIG += testcase cmdline exceptions testcase_no_bundle no_testcase_installs +CONFIG += qt testcase cmdline exceptions testcase_no_bundle no_testcase_installs #Workaround for MinGW build. Qt incorrectly sets it to empty string on Win32 for bash mingw: TEST_TARGET_DIR = .