shiboken2: update to 5.15.2, testing support, remove dummy packages
add SHIBOKEN_CLANG_OPTIONS env variable support to manage crossbuild
This commit is contained in:
parent
2ec0338af6
commit
50e5ad1c72
7 changed files with 128 additions and 20 deletions
|
@ -1677,8 +1677,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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
shiboken2
|
|
@ -1 +0,0 @@
|
|||
shiboken2
|
|
@ -0,0 +1,21 @@
|
|||
Add ability to pass additional options to clang via environnement variable.
|
||||
With help from https://github.com/void-linux/void-packages/pull/26962
|
||||
|
||||
--- sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp
|
||||
+++ sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp
|
||||
@@ -305,6 +305,15 @@
|
||||
QByteArrayList emulatedCompilerOptions()
|
||||
{
|
||||
QByteArrayList result;
|
||||
+
|
||||
+ QByteArray shiboken_clang_options = qgetenv("SHIBOKEN_CLANG_OPTIONS");
|
||||
+ // split to avoid double quoting drived by space inside it
|
||||
+ if (!shiboken_clang_options.isEmpty()) {
|
||||
+ for (const QByteArray &item: shiboken_clang_options.split(' ')) {
|
||||
+ result.append(item);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
#if defined(Q_CC_MSVC)
|
||||
HeaderPaths headerPaths;
|
||||
result.append(QByteArrayLiteral("-fms-compatibility-version=19"));
|
13
srcpkgs/shiboken2/patches/tests-need-python-modules.patch
Normal file
13
srcpkgs/shiboken2/patches/tests-need-python-modules.patch
Normal file
|
@ -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)
|
91
srcpkgs/shiboken2/patches/tests-python-syntax.patch
Normal file
91
srcpkgs/shiboken2/patches/tests-python-syntax.patch
Normal file
|
@ -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
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue