Github messages for voidlinux
 help / color / mirror / Atom feed
From: yopito <yopito@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] Qt pyside 5.15.2
Date: Sat, 16 Jan 2021 21:06:19 +0100	[thread overview]
Message-ID: <20210116200619.Fv4MNIZRZbyhFaUeqbUN7QQ2molfR7csroANaGVPJSk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26962@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

There is an updated pull request by yopito against master on the void-packages repository

https://github.com/yopito/void-packages qtpyside.5.15.2
https://github.com/void-linux/void-packages/pull/26962

[WIP] Qt pyside 5.15.2


A patch file from https://github.com/void-linux/void-packages/pull/26962.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qtpyside.5.15.2-26962.patch --]
[-- Type: text/x-diff, Size: 30524 bytes --]

From 0e5d8cf2b4ad90edad5cc6a12f1c157fe1bb28a7 Mon Sep 17 00:00:00 2001
From: yopito <pierre.bourgin@free.fr>
Date: Sat, 16 Jan 2021 21:05:12 +0100
Subject: [PATCH 1/3] shiboken2: update to 5.15.2, testing support, remove
 dummy packages

---
 common/shlibs                                 |  2 -
 srcpkgs/libshiboken-python3                   |  1 -
 srcpkgs/python3-shiboken                      |  1 -
 .../patches/tests-need-python-modules.patch   | 13 +++
 .../patches/tests-python-syntax.patch         | 91 +++++++++++++++++++
 srcpkgs/shiboken2/template                    | 19 +---
 6 files changed, 107 insertions(+), 20 deletions(-)
 delete mode 120000 srcpkgs/libshiboken-python3
 delete mode 120000 srcpkgs/python3-shiboken
 create mode 100644 srcpkgs/shiboken2/patches/tests-need-python-modules.patch
 create mode 100644 srcpkgs/shiboken2/patches/tests-python-syntax.patch

diff --git a/common/shlibs b/common/shlibs
index 5e6a8d0c6ec..8be0a048683 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1681,8 +1681,6 @@ libosmoctrl.so.0 libosmocore-0.7.0_1
 libgtkglext-x11-1.0.so.0 gtkglext-1.2.0_4
 libgdkglext-x11-1.0.so.0 gtkglext-1.2.0_4
 libXaw3d.so.8 libXaw3d-1.6.2_1
-libshiboken-python2.7.so.1.2 libshiboken-python-1.2.2_2
-libshiboken-python3.6.so.1.2 libshiboken-python3-1.2.2_4
 libshiboken2.so.5.15 libshiboken2-5.15.0_1
 libpyside-python2.7.so.1.2 libpyside-python-1.2.2_2
 libpyside-python3.6.so.1.2 libpyside-python3-1.2.2_6
diff --git a/srcpkgs/libshiboken-python3 b/srcpkgs/libshiboken-python3
deleted file mode 120000
index b1fbca61c21..00000000000
--- a/srcpkgs/libshiboken-python3
+++ /dev/null
@@ -1 +0,0 @@
-shiboken2
\ No newline at end of file
diff --git a/srcpkgs/python3-shiboken b/srcpkgs/python3-shiboken
deleted file mode 120000
index b1fbca61c21..00000000000
--- a/srcpkgs/python3-shiboken
+++ /dev/null
@@ -1 +0,0 @@
-shiboken2
\ No newline at end of file
diff --git a/srcpkgs/shiboken2/patches/tests-need-python-modules.patch b/srcpkgs/shiboken2/patches/tests-need-python-modules.patch
new file mode 100644
index 00000000000..24054690b09
--- /dev/null
+++ b/srcpkgs/shiboken2/patches/tests-need-python-modules.patch
@@ -0,0 +1,13 @@
+tests need python modules that are not installed yet: so point the built ones.
+Reported upstream: https://bugreports.qt.io/browse/PYSIDE-1429
+
+--- sources/shiboken2/tests/CMakeLists.txt.ORIG	2020-09-09 14:45:42.000000000 +0200
++++ sources/shiboken2/tests/CMakeLists.txt	2020-11-12 14:16:46.577206385 +0100
+@@ -53,6 +53,6 @@
+     list(FIND test_blacklist ${test_name} expect_fail)
+     add_test(${test_name} ${PYTHON_EXECUTABLE} ${test_file})
+-    set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "BUILD_DIR=${BUILD_DIR}")
++    set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "BUILD_DIR=${BUILD_DIR};PYTHONPATH=${shibokenmodule_BINARY_DIR}:${minimal_BINARY_DIR}:${sample_BINARY_DIR}:${other_BINARY_DIR}:${smart_BINARY_DIR}")
+     set_tests_properties(${test_name} PROPERTIES TIMEOUT ${CTEST_TESTING_TIMEOUT})
+     if (${expect_fail} GREATER -1)
+         set_tests_properties(${test_name} PROPERTIES WILL_FAIL TRUE)
diff --git a/srcpkgs/shiboken2/patches/tests-python-syntax.patch b/srcpkgs/shiboken2/patches/tests-python-syntax.patch
new file mode 100644
index 00000000000..5151c3cc71a
--- /dev/null
+++ b/srcpkgs/shiboken2/patches/tests-python-syntax.patch
@@ -0,0 +1,91 @@
+This changeset is about both shiboken2 and python3-pyside2
+(that are separated packages)
+upstream: yes
+
+From c6184e01e993dcca9798f306fb8e9cb322fdd0dc Mon Sep 17 00:00:00 2001
+From: Christian Tismer <tismer@stackless.com>
+Date: Thu, 3 Dec 2020 13:38:58 +0100
+Subject: [PATCH] fix both qflags_test and the qflags cppgenerator code
+
+There was a years-old qflags test failing on Python 3.
+It was blacklisted with the comment
+
+    "#  Nested exception in Python 3"
+
+This was nonsense: The test was wrong also for Python 2.
+It just happened to work, because Python 2 had some weird
+errors leaking. The real bug was in missing error handling
+in cppgenerator.cpp .
+
+See the main description in the issue.
+
+Change-Id: Ia0f9466640e0eb33f1b8b26178d33f2be0bcb32f
+Task-number: PYSIDE-1442
+Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
+(cherry picked from commit 288fadb796ec4e11e99e3752d531ada7edf15d75)
+---
+ build_history/blacklist.txt                          |  3 ---
+ sources/pyside2/tests/QtCore/qflags_test.py          | 12 +++++++-----
+ .../shiboken2/generator/shiboken2/cppgenerator.cpp   |  2 ++
+ 3 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git build_history/blacklist.txt build_history/blacklist.txt
+index 9b63f9784..2a2a5d4c4 100644
+--- build_history/blacklist.txt
++++ build_history/blacklist.txt
+@@ -18,9 +18,6 @@
+     darwin py3
+ [QtCore::qfileread_test]
+     darwin
+-#  Nested exception in Python 3
+-[QtCore::qflags_test]
+-    py3
+ [QtCore::qobject_connect_notify_test]
+     linux
+     darwin
+diff --git sources/pyside2/tests/QtCore/qflags_test.py sources/pyside2/tests/QtCore/qflags_test.py
+index 08a7c55b1..e1e989c1e 100644
+--- sources/pyside2/tests/QtCore/qflags_test.py
++++ sources/pyside2/tests/QtCore/qflags_test.py
+@@ -30,6 +30,7 @@
+ 
+ '''Test cases for QFlags'''
+ 
++import operator
+ import os
+ import sys
+ import unittest
+@@ -117,12 +118,13 @@ class QFlagsOnQVariant(unittest.TestCase):
+ class QFlagsWrongType(unittest.TestCase):
+     def testWrongType(self):
+         '''Wrong type passed to QFlags binary operators'''
++        for op in operator.or_, operator.and_, operator.xor:
++            for x in '43', 'jabba', QObject, object:
++                self.assertRaises(TypeError, op, Qt.NoItemFlags, x)
++                self.assertRaises(TypeError, op, x, Qt.NoItemFlags)
++        # making sure this actually does not fail all the time
++        self.assertEqual(operator.or_(Qt.NoItemFlags, 43), 43)
+ 
+-        self.assertRaises(TypeError, Qt.NoItemFlags | '43')
+-        self.assertRaises(TypeError, Qt.NoItemFlags & '43')
+-        self.assertRaises(TypeError, 'jabba' & Qt.NoItemFlags)
+-        self.assertRaises(TypeError, 'hut' & Qt.NoItemFlags)
+-        self.assertRaises(TypeError, Qt.NoItemFlags & QObject())
+ 
+ if __name__ == '__main__':
+     unittest.main()
+diff --git sources/shiboken2/generator/shiboken2/cppgenerator.cpp sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+index ff44db955..87ddd73a5 100644
+--- sources/shiboken2/generator/shiboken2/cppgenerator.cpp
++++ sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+@@ -5230,6 +5230,8 @@ void CppGenerator::writeFlagsBinaryOperator(QTextStream &s, const AbstractMetaEn
+     s << INDENT << "cppArg = static_cast<" << flagsEntry->originalName()
+         << ">(int(PyInt_AsLong(" << PYTHON_ARG << ")));\n";
+     s << "#endif\n\n";
++    s << INDENT << "if (PyErr_Occurred())\n" << indent(INDENT)
++        << INDENT << "return nullptr;\n" << outdent(INDENT);
+     s << INDENT << "cppResult = " << CPP_SELF_VAR << " " << cppOpName << " cppArg;\n";
+     s << INDENT << "return ";
+     writeToPythonConversion(s, flagsType, nullptr, QLatin1String("cppResult"));
+-- 
+2.29.2
diff --git a/srcpkgs/shiboken2/template b/srcpkgs/shiboken2/template
index d0072254842..6a7298d51d3 100644
--- a/srcpkgs/shiboken2/template
+++ b/srcpkgs/shiboken2/template
@@ -1,12 +1,11 @@
 # Template file for 'shiboken2'
 pkgname=shiboken2
-version=5.15.0
-revision=3
+version=5.15.2
+revision=1
 _pkgname="pyside-setup-opensource-src-${version}"
 wrksrc="${_pkgname/%5.14.2.1/5.14.2}"
 build_wrksrc="sources/shiboken2"
 build_style=cmake
-configure_args="-DBUILD_TESTS=OFF"
 hostmakedepends="cmake python3-devel"
 makedepends="python3-devel qt5-devel qt5-xmlpatterns-devel clang libxml2-devel
  libxslt-devel python3-numpy"
@@ -16,7 +15,7 @@ maintainer="yopito <pierre.bourgin@free.fr>"
 license="GPL-3.0-or-later"
 homepage="https://wiki.qt.io/Qt_for_Python/Shiboken"
 distfiles="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${version}-src/${_pkgname}.tar.xz"
-checksum=f1cdee53de3b76e22c1117a014a91ed95ac16e4760776f4f12dc38cd5a7b6b68
+checksum=b306504b0b8037079a8eab772ee774b9e877a2d84bab2dbefbe4fa6f83941418
 
 python_version=3
 export CLANG_INSTALL_DIR=${XBPS_CROSS_BASE}/usr
@@ -50,15 +49,3 @@ python3-shiboken2_package() {
 		vmove ${py3_sitelib}
 	}
 }
-
-python3-shiboken_package() {
-	short_desc="Python3 shiboken2 bindings - tranditional dummy pkg"
-	depends="python3-shiboken2-${version}_${revision}"
-	build_style=meta
-}
-
-libshiboken-python3_package() {
-	short_desc="Python3 shiboken2 bindings - tranditional dummy pkg"
-	depends="python3-shiboken2-${version}_${revision}"
-	build_style=meta
-}

From 895be7ff609a8cce2faceac7d780b24540c15957 Mon Sep 17 00:00:00 2001
From: yopito <pierre.bourgin@free.fr>
Date: Sat, 16 Jan 2021 21:05:13 +0100
Subject: [PATCH 2/3] python3-pyside2: update to 5.15.2, testing support,
 remove dummy packages

* broken on non-atomic8 platforms
* broken on arvm7l-glibc crossbuild
---
 common/shlibs                                 |   2 -
 srcpkgs/libpyside-python3                     |   1 -
 srcpkgs/python3-pyenet                        |   1 -
 srcpkgs/python3-pyside                        |   1 -
 srcpkgs/python3-pyside-phonon                 |   1 -
 .../patches/crossbuild-for-shiboken2.patch    |  18 +--
 .../patches/tests-correct-build_dir.patch     |  14 +++
 .../patches/tests-disable-invalid-ones.patch  |  74 ++++++++++++
 ...tests-find-python-modules-from-build.patch |  21 ++++
 .../patches/tests-python-syntax.patch         | 106 ++++++++++++++++++
 srcpkgs/python3-pyside2/template              |  62 +++++-----
 11 files changed, 255 insertions(+), 46 deletions(-)
 delete mode 120000 srcpkgs/libpyside-python3
 delete mode 120000 srcpkgs/python3-pyenet
 delete mode 120000 srcpkgs/python3-pyside
 delete mode 120000 srcpkgs/python3-pyside-phonon
 create mode 100644 srcpkgs/python3-pyside2/patches/tests-correct-build_dir.patch
 create mode 100644 srcpkgs/python3-pyside2/patches/tests-disable-invalid-ones.patch
 create mode 100644 srcpkgs/python3-pyside2/patches/tests-find-python-modules-from-build.patch
 create mode 100644 srcpkgs/python3-pyside2/patches/tests-python-syntax.patch

diff --git a/common/shlibs b/common/shlibs
index 8be0a048683..92dc5963825 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1682,8 +1682,6 @@ libgtkglext-x11-1.0.so.0 gtkglext-1.2.0_4
 libgdkglext-x11-1.0.so.0 gtkglext-1.2.0_4
 libXaw3d.so.8 libXaw3d-1.6.2_1
 libshiboken2.so.5.15 libshiboken2-5.15.0_1
-libpyside-python2.7.so.1.2 libpyside-python-1.2.2_2
-libpyside-python3.6.so.1.2 libpyside-python3-1.2.2_6
 libpyside2.so.5.15 libpyside2-python3-5.15.0_1
 libupsclient.so.4 libnetwork-ups-tools-2.7.2_1
 libnutclient.so.0 libnetwork-ups-tools-2.7.2_1
diff --git a/srcpkgs/libpyside-python3 b/srcpkgs/libpyside-python3
deleted file mode 120000
index bb1745350a8..00000000000
--- a/srcpkgs/libpyside-python3
+++ /dev/null
@@ -1 +0,0 @@
-python3-pyside2
\ No newline at end of file
diff --git a/srcpkgs/python3-pyenet b/srcpkgs/python3-pyenet
deleted file mode 120000
index bb1745350a8..00000000000
--- a/srcpkgs/python3-pyenet
+++ /dev/null
@@ -1 +0,0 @@
-python3-pyside2
\ No newline at end of file
diff --git a/srcpkgs/python3-pyside b/srcpkgs/python3-pyside
deleted file mode 120000
index bb1745350a8..00000000000
--- a/srcpkgs/python3-pyside
+++ /dev/null
@@ -1 +0,0 @@
-python3-pyside2
\ No newline at end of file
diff --git a/srcpkgs/python3-pyside-phonon b/srcpkgs/python3-pyside-phonon
deleted file mode 120000
index bb1745350a8..00000000000
--- a/srcpkgs/python3-pyside-phonon
+++ /dev/null
@@ -1 +0,0 @@
-python3-pyside2
\ No newline at end of file
diff --git a/srcpkgs/python3-pyside2/patches/crossbuild-for-shiboken2.patch b/srcpkgs/python3-pyside2/patches/crossbuild-for-shiboken2.patch
index 5a071a33d20..daad1fea702 100644
--- a/srcpkgs/python3-pyside2/patches/crossbuild-for-shiboken2.patch
+++ b/srcpkgs/python3-pyside2/patches/crossbuild-for-shiboken2.patch
@@ -1,11 +1,11 @@
 --- sources/pyside2/cmake/Macros/PySideModules.cmake.ORIG
 +++ sources/pyside2/cmake/Macros/PySideModules.cmake
-@@ -123,7 +123,7 @@
-                         BYPRODUCTS ${${module_SOURCES}}
-                         COMMAND Shiboken2::shiboken2 ${GENERATOR_EXTRA_FLAGS}
-                         "${pyside2_BINARY_DIR}/${module_NAME}_global.h"
--                        --include-paths=${shiboken_include_dirs}
-+                        --include-paths=${shiboken_include_dirs}${PATH_SEP}${CMAKE_FIND_ROOT_PATH}/usr/include
-                         ${shiboken_framework_include_dirs_option}
-                         --typesystem-paths=${pyside_binary_dir}${PATH_SEP}${pyside2_SOURCE_DIR}${PATH_SEP}${${module_TYPESYSTEM_PATH}}
-                         --output-directory=${CMAKE_CURRENT_BINARY_DIR}
+@@ -94,7 +94,7 @@
+     # Workaround: Added ${QT_INCLUDE_DIR}/QtCore until
+     # qtdeclarative/8d560d1bf0a747bf62f73fad6b6774095442d9d2 has reached qt5.git
+     string(REPLACE ";" ${PATH_SEP} core_includes "${Qt5Core_INCLUDE_DIRS}")
+-    set(shiboken_include_dirs ${pyside2_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${core_includes})
++    set(shiboken_include_dirs ${pyside2_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${core_includes}${PATH_SEP}${CMAKE_FIND_ROOT_PATH}/usr/include)
+     set(shiboken_framework_include_dirs_option "")
+     if(CMAKE_HOST_APPLE)
+         set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}")
diff --git a/srcpkgs/python3-pyside2/patches/tests-correct-build_dir.patch b/srcpkgs/python3-pyside2/patches/tests-correct-build_dir.patch
new file mode 100644
index 00000000000..540e4304958
--- /dev/null
+++ b/srcpkgs/python3-pyside2/patches/tests-correct-build_dir.patch
@@ -0,0 +1,14 @@
+Reported upstream: https://bugreports.qt.io/browse/PYSIDE-1430
+
+--- sources/pyside2/tests/CMakeLists.txt.ORIG	2020-11-11 13:51:30.000000000 +0100
++++ sources/pyside2/tests/CMakeLists.txt	2020-11-24 11:42:34.629110123 +0100
+@@ -7,8 +7,7 @@
+ 
+     # BUILD_DIR and QT_DIR are used by init_paths.py for setting
+     # the path to the testbinding module
+-    get_filename_component(BUILD_DIR "${CMAKE_BINARY_DIR}" DIRECTORY)
+-    get_filename_component(BUILD_DIR "${CMAKE_BINARY_DIR}" DIRECTORY)
++    set(BUILD_DIR "${CMAKE_BINARY_DIR}")
+     set(QT_DIR "${_qt5Core_install_prefix}")
+ 
+     macro(TEST_QT_MODULE var name)
diff --git a/srcpkgs/python3-pyside2/patches/tests-disable-invalid-ones.patch b/srcpkgs/python3-pyside2/patches/tests-disable-invalid-ones.patch
new file mode 100644
index 00000000000..3b9d031145a
--- /dev/null
+++ b/srcpkgs/python3-pyside2/patches/tests-disable-invalid-ones.patch
@@ -0,0 +1,74 @@
+Disable failing tests. Almost of these are related to OpenGL that is
+unsupported by vnc virtual backend.
+
+Full testing Status: 98% tests passed, 9 tests failed out of 471
+
+--- sources/pyside2/tests/QtDataVisualization/CMakeLists.txt.ORIG
++++ sources/pyside2/tests/QtDataVisualization/CMakeLists.txt
+@@ -1 +0,0 @@
+-PYSIDE_TEST(datavisualization_test.py)
+--- sources/pyside2/tests/QtGui/CMakeLists.txt.ORIG
++++ sources/pyside2/tests/QtGui/CMakeLists.txt
+@@ -20,14 +20,12 @@
+ PYSIDE_TEST(qcolor_test.py)
+ PYSIDE_TEST(qcolor_reduce_test.py)
+ PYSIDE_TEST(qcursor_test.py)
+-PYSIDE_TEST(qdatastream_gui_operators_test.py)
+ PYSIDE_TEST(qdesktopservices_test.py)
+ PYSIDE_TEST(qfontmetrics_test.py)
+ PYSIDE_TEST(qguiapplication_test.py)
+ PYSIDE_TEST(qicon_test.py)
+ PYSIDE_TEST(qitemselection_test.py)
+ PYSIDE_TEST(qmatrix_test.py)
+-PYSIDE_TEST(qopenglbuffer_test.py)
+ PYSIDE_TEST(qpainter_test.py)
+ PYSIDE_TEST(qpdfwriter_test.py)
+ PYSIDE_TEST(qpixelformat_test.py)
+--- sources/pyside2/tests/QtOpenGL/CMakeLists.txt.ORIG
++++ sources/pyside2/tests/QtOpenGL/CMakeLists.txt
+@@ -1,2 +1 @@
+-PYSIDE_TEST(qglbuffer_test.py)
+ PYSIDE_TEST(qglwidget_test.py)
+--- sources/pyside2/tests/QtScriptTools/CMakeLists.txt.ORIG
++++ sources/pyside2/tests/QtScriptTools/CMakeLists.txt
+@@ -1 +0,0 @@
+-PYSIDE_TEST(debugger_test.py)
+--- sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt.ORIG
++++ sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt
+@@ -26,4 +26,3 @@
+ ##
+ #############################################################################
+ 
+-PYSIDE_TEST(web_engine_custom_scheme.py)
+--- sources/pyside2/tests/QtWebEngineWidgets/CMakeLists.txt.ORIG
++++ sources/pyside2/tests/QtWebEngineWidgets/CMakeLists.txt
+@@ -26,4 +26,3 @@
+ ##
+ #############################################################################
+ 
+-PYSIDE_TEST(pyside-474-qtwebengineview.py)
+--- sources/pyside2/tests/QtWidgets/CMakeLists.txt.ORIG
++++ sources/pyside2/tests/QtWidgets/CMakeLists.txt
+@@ -6,7 +6,6 @@
+ PYSIDE_TEST(application_test.py)
+ PYSIDE_TEST(bug_172.py)
+ PYSIDE_TEST(bug_243.py)
+-PYSIDE_TEST(bug_307.py)
+ PYSIDE_TEST(bug_324.py)
+ PYSIDE_TEST(bug_338.py)
+ PYSIDE_TEST(bug_363.py)
+@@ -131,7 +131,6 @@
+ PYSIDE_TEST(qtoolbox_test.py)
+ PYSIDE_TEST(qvariant_test.py)
+ PYSIDE_TEST(qwidget_setlayout_test.py)
+-PYSIDE_TEST(qwidget_test.py)
+ PYSIDE_TEST(qcolormap_test.py)
+ PYSIDE_TEST(reference_count_test.py)
+ PYSIDE_TEST(signature_test.py)
+--- sources/pyside2/tests/registry/CMakeLists.txt.ORIG
++++ sources/pyside2/tests/registry/CMakeLists.txt
+@@ -37,4 +37,3 @@
+ ##
+ #############################################################################
+ 
+-PYSIDE_TEST(existence_test.py)
diff --git a/srcpkgs/python3-pyside2/patches/tests-find-python-modules-from-build.patch b/srcpkgs/python3-pyside2/patches/tests-find-python-modules-from-build.patch
new file mode 100644
index 00000000000..673998bc049
--- /dev/null
+++ b/srcpkgs/python3-pyside2/patches/tests-find-python-modules-from-build.patch
@@ -0,0 +1,21 @@
+tests need python modules that are not installed yet: point the built ones.
+Reported upstream: https://bugreports.qt.io/browse/PYSIDE-1430
+
+--- sources/pyside2/tests/init_paths.py.ORIG	2020-11-11 13:51:30.000000000 +0100
++++ sources/pyside2/tests/init_paths.py	2020-11-21 23:36:33.131282473 +0100
+@@ -75,12 +75,12 @@
+ 
+     python_dirs = [os.path.join(src_dir, 'util')]  # Helper module
+ 
+-    pyside_build_dir = os.path.join(get_build_dir(), 'pyside2')
+-    python_dirs.append(pyside_build_dir)   # for PySide2
++    pyside_build_dir = os.path.join(get_build_dir(), 'PySide2')
++    python_dirs.append(get_build_dir())   # for PySide2
+     lib_dirs = [os.path.join(pyside_build_dir, 'libpyside')]
+ 
+     if testbindings_module:
+-        python_dirs.append(os.path.join(pyside_build_dir,
++        python_dirs.append(os.path.join(get_build_dir(),
+                                         'tests', 'pysidetest'))
+         lib_dirs.append(_get_qt_lib_dir())
+ 
diff --git a/srcpkgs/python3-pyside2/patches/tests-python-syntax.patch b/srcpkgs/python3-pyside2/patches/tests-python-syntax.patch
new file mode 100644
index 00000000000..2c2e1367907
--- /dev/null
+++ b/srcpkgs/python3-pyside2/patches/tests-python-syntax.patch
@@ -0,0 +1,106 @@
+This changeset is about both shiboken2 and python3-pyside2
+(that are separated packages)
+upstream: yes
+
+From c6184e01e993dcca9798f306fb8e9cb322fdd0dc Mon Sep 17 00:00:00 2001
+From: Christian Tismer <tismer@stackless.com>
+Date: Thu, 3 Dec 2020 13:38:58 +0100
+Subject: [PATCH] fix both qflags_test and the qflags cppgenerator code
+
+There was a years-old qflags test failing on Python 3.
+It was blacklisted with the comment
+
+    "#  Nested exception in Python 3"
+
+This was nonsense: The test was wrong also for Python 2.
+It just happened to work, because Python 2 had some weird
+errors leaking. The real bug was in missing error handling
+in cppgenerator.cpp .
+
+See the main description in the issue.
+
+Change-Id: Ia0f9466640e0eb33f1b8b26178d33f2be0bcb32f
+Task-number: PYSIDE-1442
+Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
+(cherry picked from commit 288fadb796ec4e11e99e3752d531ada7edf15d75)
+---
+ build_history/blacklist.txt                          |  3 ---
+ sources/pyside2/tests/QtCore/qflags_test.py          | 12 +++++++-----
+ .../shiboken2/generator/shiboken2/cppgenerator.cpp   |  2 ++
+ 3 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git build_history/blacklist.txt build_history/blacklist.txt
+index 9b63f9784..2a2a5d4c4 100644
+--- build_history/blacklist.txt
++++ build_history/blacklist.txt
+@@ -18,9 +18,6 @@
+     darwin py3
+ [QtCore::qfileread_test]
+     darwin
+-#  Nested exception in Python 3
+-[QtCore::qflags_test]
+-    py3
+ [QtCore::qobject_connect_notify_test]
+     linux
+     darwin
+diff --git sources/pyside2/tests/QtCore/qflags_test.py sources/pyside2/tests/QtCore/qflags_test.py
+index 08a7c55b1..e1e989c1e 100644
+--- sources/pyside2/tests/QtCore/qflags_test.py
++++ sources/pyside2/tests/QtCore/qflags_test.py
+@@ -30,6 +30,7 @@
+ 
+ '''Test cases for QFlags'''
+ 
++import operator
+ import os
+ import sys
+ import unittest
+@@ -117,12 +118,13 @@ class QFlagsOnQVariant(unittest.TestCase):
+ class QFlagsWrongType(unittest.TestCase):
+     def testWrongType(self):
+         '''Wrong type passed to QFlags binary operators'''
++        for op in operator.or_, operator.and_, operator.xor:
++            for x in '43', 'jabba', QObject, object:
++                self.assertRaises(TypeError, op, Qt.NoItemFlags, x)
++                self.assertRaises(TypeError, op, x, Qt.NoItemFlags)
++        # making sure this actually does not fail all the time
++        self.assertEqual(operator.or_(Qt.NoItemFlags, 43), 43)
+ 
+-        self.assertRaises(TypeError, Qt.NoItemFlags | '43')
+-        self.assertRaises(TypeError, Qt.NoItemFlags & '43')
+-        self.assertRaises(TypeError, 'jabba' & Qt.NoItemFlags)
+-        self.assertRaises(TypeError, 'hut' & Qt.NoItemFlags)
+-        self.assertRaises(TypeError, Qt.NoItemFlags & QObject())
+ 
+ if __name__ == '__main__':
+     unittest.main()
+diff --git sources/shiboken2/generator/shiboken2/cppgenerator.cpp sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+index ff44db955..87ddd73a5 100644
+--- sources/shiboken2/generator/shiboken2/cppgenerator.cpp
++++ sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+@@ -5230,6 +5230,8 @@ void CppGenerator::writeFlagsBinaryOperator(QTextStream &s, const AbstractMetaEn
+     s << INDENT << "cppArg = static_cast<" << flagsEntry->originalName()
+         << ">(int(PyInt_AsLong(" << PYTHON_ARG << ")));\n";
+     s << "#endif\n\n";
++    s << INDENT << "if (PyErr_Occurred())\n" << indent(INDENT)
++        << INDENT << "return nullptr;\n" << outdent(INDENT);
+     s << INDENT << "cppResult = " << CPP_SELF_VAR << " " << cppOpName << " cppArg;\n";
+     s << INDENT << "return ";
+     writeToPythonConversion(s, flagsType, nullptr, QLatin1String("cppResult"));
+-- 
+2.29.2
+
+Fix python warning about 'is not' usage.
+This diff is DISTINCT from the previous patch
+
+--- sources/pyside2/tests/QtWidgets/qwidget_test.py	2020-11-11 13:51:30.000000000 +0100
++++ sources/pyside2/tests/QtWidgets/qwidget_test.py	2020-11-24 14:28:06.103093649 +0100
+@@ -73,7 +73,7 @@
+         self.assertTrue(not widget.isVisible())
+         widget.setVisible(True)
+         self.assertTrue(widget.isVisible())
+-        self.assertTrue(widget.winId() is not 0)
++        self.assertTrue(widget.winId() != 0)
+         # skip this test on macOS since no native events are received
+         if sys.platform == 'darwin':
+             return
diff --git a/srcpkgs/python3-pyside2/template b/srcpkgs/python3-pyside2/template
index fe69087e4d0..c7ea90d0a73 100644
--- a/srcpkgs/python3-pyside2/template
+++ b/srcpkgs/python3-pyside2/template
@@ -1,12 +1,12 @@
 # Template file for 'python3-pyside2'
 pkgname=python3-pyside2
-version=5.15.0
-revision=2
+version=5.15.2
+revision=1
 _pkgname="pyside-setup-opensource-src-${version}"
 wrksrc="${_pkgname/%5.14.2.1/5.14.2}"
 build_wrksrc="sources/pyside2"
 build_style=cmake
-configure_args="-DBUILD_TESTS=OFF -DPYTHON_EXECUTABLE=/usr/bin/python"
+configure_args="-DPYTHON_EXECUTABLE=/usr/bin/python"
 hostmakedepends="cmake python3 shiboken2"
 makedepends="python3-devel libshiboken2-devel qt5-devel
  qt5-multimedia-devel qt5-tools-devel qt5-plugin-mysql qt5-plugin-odbc
@@ -18,34 +18,54 @@ makedepends="python3-devel libshiboken2-devel qt5-devel
  qt5-serialport-devel
  $(vopt_if webengine 'qt5-webengine-devel')"
 depends="python3-shiboken2"
+checkdepends="python3-distro tzdata pulseaudio qt5-quickcontrols"
 short_desc="Python3 bindings for the Qt5 toolkit"
 maintainer="yopito <pierre.bourgin@free.fr>"
 license="LGPL-3.0-or-later"
 homepage="https://wiki.qt.io/Qt_for_Python"
 distfiles="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${version}-src/${_pkgname}.tar.xz"
-checksum=f1cdee53de3b76e22c1117a014a91ed95ac16e4760776f4f12dc38cd5a7b6b68
+checksum=b306504b0b8037079a8eab772ee774b9e877a2d84bab2dbefbe4fa6f83941418
+
+build_options="webengine"
+desc_option_webengine="Build Qt5 WebEngine bindings"
+
+subpackages="libpyside2-python3-devel libpyside2-python3"
 
 # needed by shiboken2 runtime
 export CLANG_INSTALL_DIR=${XBPS_CROSS_BASE}/usr
 
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	# see https://github.com/void-linux/void-packages/pull/26962
+	broken="Requires 8-byte atomics"
+fi
+
 if [ ${CROSS_BUILD} ]; then
 	hostmakedepends+=" qt5-qmake qt5-host-tools qt5-tools qt5-remoteobjects qt5-scxml"
-fi
 
-build_options="webengine"
-desc_option_webengine="Build Qt5 WebEngine bindings"
+	# shiboken2 calls clang without defining target's platform, so it fails for some platform.
+	# related upsteam's bug https://bugreports.qt.io/browse/PYSIDE-1477
+	if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
+		case "$XBPS_TARGET_MACHINE" in
+			armv7*) broken="see https://bugreports.qt.io/browse/PYSIDE-1477" ;;
+		esac
+	fi
+fi
 
 if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then
-	build_options_default="webengine"
+	if [ "$XBPS_TARGET_WORDSIZE" = "$XBPS_WORDSIZE" ]; then
+		build_options_default="webengine"
+	fi
 fi
 
-subpackages="libpyside2-python3-devel libpyside2-python3 libpyside-python3
- python3-pyside python3-pyside-phonon python3-pyenet"
-
 if [ "$build_option_webengine" ]; then
 	subpackages+=" python3-pyside2-webengine"
 fi
 
+pre_check() {
+	# no virtual backend is fine for OpenGL, vnc is fine for Qml tests
+	export QT_QPA_PLATFORM=vnc
+}
+
 python3-pyside2-webengine_package() {
 	depends="python3-pyside2-${version}_${revision}"
 	short_desc+=" - WebEngine component"
@@ -73,23 +93,3 @@ libpyside2-python3_package() {
 		vmove "usr/lib/*.so.*"
 	}
 }
-
-libpyside-python3_package() {
-	short_desc+=" - transitional dummy package"
-	build_style=meta
-}
-
-python3-pyside_package() {
-	short_desc+=" - transitional dummy package"
-	build_style=meta
-}
-
-python3-pyside-phonon_package() {
-	short_desc+=" - transitional dummy package"
-	build_style=meta
-}
-
-python3-pyenet_package() {
-	short_desc+=" - transitional dummy package"
-	build_style=meta
-}

From 2e7104809598dde2b2d48ba0ee59ca97c2b24bc6 Mon Sep 17 00:00:00 2001
From: yopito <pierre.bourgin@free.fr>
Date: Sat, 16 Jan 2021 21:05:15 +0100
Subject: [PATCH 3/3] pyside2-tools: update to 5.15.2, testing support

---
 .../patches/tests-use-qt5-rcc-and-uic.patch   | 34 +++++++++++++++++++
 srcpkgs/pyside2-tools/template                | 10 ++++--
 2 files changed, 41 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/pyside2-tools/patches/tests-use-qt5-rcc-and-uic.patch

diff --git a/srcpkgs/pyside2-tools/patches/tests-use-qt5-rcc-and-uic.patch b/srcpkgs/pyside2-tools/patches/tests-use-qt5-rcc-and-uic.patch
new file mode 100644
index 00000000000..0dc0f0bfb11
--- /dev/null
+++ b/srcpkgs/pyside2-tools/patches/tests-use-qt5-rcc-and-uic.patch
@@ -0,0 +1,34 @@
+--- sources/pyside2-tools/tests/CMakeLists.txt
++++ sources/pyside2-tools/tests/CMakeLists.txt
+@@ -1,4 +1,11 @@
++
++# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc,
++# with '-g python' option
++
++FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic)
++FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc)
++
+ add_subdirectory(rcc)
+-add_test(QWizard ${SHIBOKEN_PYTHON_INTERPRETER} ${CMAKE_SOURCE_DIR}/pyside2-uic "${CMAKE_CURRENT_SOURCE_DIR}/qwizard_test.ui")
++add_test(QWizard ${PYSIDE2UICBINARY} --generator=python "${CMAKE_CURRENT_SOURCE_DIR}/qwizard_test.ui")
+ set_tests_properties(QWizard PROPERTIES
+                      ENVIRONMENT "PYTHONPATH=$ENV{PYTHONPATH}:${CMAKE_SOURCE_DIR}:${CMAKE_CURRENT_SOURCE_DIR}")
+--- sources/pyside2-tools/tests/rcc/CMakeLists.txt
++++ sources/pyside2-tools/tests/rcc/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ macro(ADD_RCC_TEST name pyfile qrcfile)
+     add_test(${name} ${CMAKE_CURRENT_SOURCE_DIR}/run_test.sh
+-                     ${PYSIDERCC_EXECUTABLE}
++                     ${PYSIDE2RCCBINARY}
+                      ${CMAKE_CURRENT_SOURCE_DIR}/${pyfile}
+                      ${CMAKE_CURRENT_SOURCE_DIR}/${qrcfile}
+                      ${CMAKE_CURRENT_SOURCE_DIR})
+--- sources/pyside2-tools/tests/rcc/run_test.sh
++++ sources/pyside2-tools/tests/rcc/run_test.sh
+@@ -8,5 +8,5 @@
+ # $3: qrc file
+ 
+ export PYTHONPATH=$PYTHONPATH:`pwd`
+-$1 -o `basename $3 .qrc`_rc.py $3
++$1 --generator=python -o `basename $3 .qrc`_rc.py $3
+ `pkg-config shiboken2 --variable=python_interpreter` $2
diff --git a/srcpkgs/pyside2-tools/template b/srcpkgs/pyside2-tools/template
index 4e9fa743c30..7b49a46ec81 100644
--- a/srcpkgs/pyside2-tools/template
+++ b/srcpkgs/pyside2-tools/template
@@ -1,23 +1,27 @@
 # Template file for 'pyside2-tools'
 pkgname=pyside2-tools
-version=5.15.0
+version=5.15.2
 revision=1
 _pkgname="pyside-setup-opensource-src-${version}"
 wrksrc="${_pkgname/%5.14.2.1/5.14.2}"
 build_wrksrc="sources/pyside2-tools"
 build_style=cmake
-configure_args="-DBUILD_TESTS=OFF"
 hostmakedepends="cmake python3-devel shiboken2"
 makedepends="python3-devel libshiboken2-devel qt5-devel
  libpyside2-python3-devel"
+checkdepends="pkg-config"
 short_desc="Python3 bindings for the Qt5 toolkit"
 maintainer="yopito <pierre.bourgin@free.fr>"
 license="LGPL-3.0-or-later"
 homepage="https://wiki.qt.io/Qt_for_Python/Shiboken"
 distfiles="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${version}-src/${_pkgname}.tar.xz"
-checksum=f1cdee53de3b76e22c1117a014a91ed95ac16e4760776f4f12dc38cd5a7b6b68
+checksum=b306504b0b8037079a8eab772ee774b9e877a2d84bab2dbefbe4fa6f83941418
 python_version=3
 
 if [ ${CROSS_BUILD} ]; then
 	hostmakedepends+=" qt5-qmake qt5-host-tools"
 fi
+
+pre_check() {
+	export QT_QPA_PLATFORM=offscreen
+}

  parent reply	other threads:[~2021-01-16 20:06 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-05 13:27 [PR PATCH] [WIP] Qt pyside 5.12.2 yopito
2020-12-05 22:49 ` ericonr
2020-12-05 23:18 ` ericonr
2020-12-05 23:19 ` ericonr
2020-12-06  9:06 ` yopito
2020-12-19 15:48 ` [PR PATCH] [Updated] [WIP] Qt pyside 5.15.2 yopito
2020-12-19 16:18 ` yopito
2020-12-19 17:53 ` yopito
2020-12-19 17:55 ` yopito
2020-12-20 10:43 ` [PR PATCH] [Updated] " yopito
2020-12-20 12:33 ` yopito
2020-12-20 12:35 ` yopito
2020-12-26  4:58 ` sgn
2020-12-26  5:10 ` ericonr
2020-12-26 11:13 ` yopito
2020-12-26 19:57 ` ericonr
2021-01-16 20:06 ` yopito [this message]
2021-01-16 20:14 ` yopito
2021-01-17  0:33 ` Qt pyside : update to 5.15.2 yopito
2021-01-17  1:27 ` ericonr
2021-01-17  3:11 ` q66
2021-01-17 10:27 ` yopito
2021-01-17 19:06 ` [WIP] " ericonr
2021-01-17 19:25 ` ericonr
2021-01-17 19:26 ` ericonr
2021-01-17 19:50 ` yopito
2021-01-17 20:01 ` ericonr
2021-01-17 20:04 ` ericonr
2021-01-18  0:27 ` ericonr
2021-01-18 19:29 ` yopito
2021-01-18 19:33 ` ericonr
2021-01-22 18:40 ` yopito
2021-01-22 18:51 ` yopito
2021-01-23 18:59 ` [PR PATCH] [Updated] " yopito
2021-01-23 22:35 ` yopito
2021-01-24  8:19 ` yopito
2021-01-26 21:22 ` [PR REVIEW] " ericonr
2021-01-26 21:38 ` q66
2021-01-26 22:46 ` yopito
2021-01-26 23:16 ` ericonr
2021-01-26 23:43 ` sgn
2021-01-27 19:10 ` [PR PATCH] [Updated] " yopito
2021-01-27 19:14 ` [PR REVIEW] " yopito
2021-01-27 22:15 ` ericonr
2021-01-27 22:55 ` [PR PATCH] [Updated] " yopito
2021-01-27 22:55 ` [PR REVIEW] " yopito
2021-01-28  0:15 ` q66
2021-01-28  3:33 ` [PR PATCH] [Closed]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210116200619.Fv4MNIZRZbyhFaUeqbUN7QQ2molfR7csroANaGVPJSk@z \
    --to=yopito@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).