Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions build/PythonQt.prf
Original file line number Diff line number Diff line change
Expand Up @@ -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}
6 changes: 2 additions & 4 deletions build/PythonQt_QtAll.prf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}
LIBS += -ltrikPythonQt_QtAll-Qt$${QT_MAJOR_VERSION}$${QT_MINOR_VERSION}-Python$${PYTHON_VERSION}$${DEBUG_EXT}
5 changes: 5 additions & 0 deletions build/common.prf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions examples/CPPPyWrapperExample/CPPPyWrapperExample.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ TEMPLATE = app

mac:CONFIG -= app_bundle

DESTDIR = ../../lib

include ( ../../build/common.prf )
include ( ../../build/PythonQt.prf )

Expand Down
2 changes: 0 additions & 2 deletions examples/PyCPPWrapperExample/PyCPPWrapperExample.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
TARGET = PyCPPWrapperExample
TEMPLATE = app

DESTDIR = ../../lib

include ( ../../build/common.prf )
include ( ../../build/PythonQt.prf )

Expand Down
2 changes: 0 additions & 2 deletions examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
TARGET = PyCustomMetaTypeExample
TEMPLATE = app

DESTDIR = ../../lib

include ( ../../build/common.prf )
include ( ../../build/PythonQt.prf )

Expand Down
2 changes: 0 additions & 2 deletions examples/PyDecoratorsExample/PyDecoratorsExample.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
TARGET = PyDecoratorsExample
TEMPLATE = app

DESTDIR = ../../lib

include ( ../../build/common.prf )
include ( ../../build/PythonQt.prf )

Expand Down
2 changes: 0 additions & 2 deletions examples/PyGettingStarted/PyGettingStarted.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
TARGET = PyGettingStarted
TEMPLATE = app

DESTDIR = ../../lib

CONFIG += console

include ( ../../build/common.prf )
Expand Down
2 changes: 0 additions & 2 deletions examples/PyGuiExample/PyGuiExample.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ TEMPLATE = app

mac:CONFIG -= app_bundle

DESTDIR = ../../lib

QT += widgets

include ( ../../build/common.prf )
Expand Down
2 changes: 0 additions & 2 deletions examples/PyLauncher/PyLauncher.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ TEMPLATE = app

mac:CONFIG -= app_bundle

DESTDIR = ../../lib

QT += widgets

include ( ../../build/common.prf )
Expand Down
2 changes: 0 additions & 2 deletions examples/PyScriptingConsole/PyScriptingConsole.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
TARGET = PyScriptingConsole
TEMPLATE = app

DESTDIR = ../../lib

mac:CONFIG-= app_bundle

include ( ../../build/common.prf )
Expand Down
6 changes: 2 additions & 4 deletions extensions/PythonQt_QtAll/PythonQt_QtAll.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion generator/generator.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 )

Expand Down
4 changes: 1 addition & 3 deletions tests/tests.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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 = .
Expand Down