aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--setup.py4
-rw-r--r--sources/pyside2/tests/QtCore/qinstallmsghandler_test.py7
-rw-r--r--sources/shiboken2/CMakeLists.txt14
3 files changed, 19 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index d73760be6..a348ee383 100644
--- a/setup.py
+++ b/setup.py
@@ -1601,7 +1601,9 @@ setup(
url = 'http://www.pyside.org',
download_url = 'https://download.qt-project.org/official_releases/pyside2/',
license = 'LGPL',
- packages = ['PySide2', 'pyside2uic'],
+ packages = ['PySide2', 'pyside2uic',
+ 'pyside2uic.Compiler',
+ 'pyside2uic.port_v%s' % (sys.version_info[0]) ],
package_dir = {'': 'pyside_package'},
include_package_data = True,
zip_safe = False,
diff --git a/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py b/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py
index d8f7bb3a5..08580823e 100644
--- a/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py
+++ b/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py
@@ -65,9 +65,10 @@ class QInstallMsgHandlerTest(unittest.TestCase):
def testHandler(self):
rethandler = qInstallMessageHandler(handler)
- qDebug("Test Debug")
- self.assertEqual(param[0], QtDebugMsg)
- self.assertEqual(param[2], "Test Debug")
+ if QLibraryInfo.isDebugBuild():
+ qDebug("Test Debug")
+ self.assertEqual(param[0], QtDebugMsg)
+ self.assertEqual(param[2], "Test Debug")
qWarning("Test Warning")
self.assertEqual(param[0], QtWarningMsg)
self.assertEqual(param[2], "Test Warning")
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt
index 288de8117..b9dd0a7f9 100644
--- a/sources/shiboken2/CMakeLists.txt
+++ b/sources/shiboken2/CMakeLists.txt
@@ -302,6 +302,12 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(SHIBOKEN_BUILD_TYPE "Release")
+
+# We do not want to link against the python shared / static library on Linux And macOS.
+# The dynamic linker will pick up the python symbols at runtime automatically.
+# On Windows we do need to link against the python.lib import library.
+
+set(SBK_PYTHON_LIBRARIES "")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(NOT PYTHON_DEBUG_LIBRARIES)
message(WARNING "Python debug shared library not found; assuming python was built with shared library support disabled.")
@@ -321,10 +327,14 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(SBK_PKG_CONFIG_PY_DEBUG_DEFINITION "${SBK_PKG_CONFIG_PY_DEBUG_DEFINITION} -DCOUNT_ALLOCS")
endif()
- set(SBK_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
+ if(WIN32)
+ set(SBK_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
+ endif()
set(SHIBOKEN_BUILD_TYPE "Debug")
else()
- set(SBK_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
+ if(WIN32)
+ set(SBK_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
+ endif()
add_definitions("-DNDEBUG")
endif()