@@ -25,14 +25,9 @@ PYTHON_VERSION_MINOR=$$section(PYTHON_VERSION, ., 1, 1)
2525 message(Using Python version $${PYTHON_VERSION})
2626}
2727
28-
29- # Python 2.x has problems:
30- # 1) https://wiki.gentoo.org/wiki/Project:Python/Strict_aliasing
31- # 2) deprecated implicit cast of string literals to char*
28+ # Python 3.x is required
3229equals(PYTHON_VERSION_MAJOR, 2) {
33- gcc:QMAKE_CXXFLAGS *= -fno-strict-aliasing -Wno-write-strings
34- # Qt 5.4 adds this option, but this is not compatible with the Python API
35- msvc: QMAKE_CXXFLAGS -= -Zc:strictStrings
30+ error("Python >= 3.x is required")
3631}
3732
3833contains(PKGCONFIG, "python.*"){
@@ -73,13 +68,6 @@ contains(PKGCONFIG, "python.*"){
7368 error("PYTHON_PATH must be set to correct folder with \\libs and \\include subfolders ")
7469 }
7570
76- #We need to destinguish 64-bit build to add a workaround option
77- #The only known problematic case is MinGW with external (MSVC-built) Python2
78- mingw:equals(PYTHON_VERSION_MAJOR, 2): isEmpty(QMAKE_TARGET.arch):system(\
79- $$system_quote($$system_path($${PYTHON_PATH}/python.exe)) -c \
80- $$system_quote(import sysconfig;exit(0 if 0 <= sysconfig.get_platform().find(\'win-amd64\') else 1))\
81- ):DEFINES += MS_WIN64
82-
8371 INCLUDEPATH += $$shell_path($${PYTHON_PATH}/include)
8472
8573 LIBS += $$shell_path(-L$${PYTHON_PATH}/libs)
0 commit comments