[arch-commits] Commit in shiboken2/repos (3 files)

Evangelos Foutras foutrelis at archlinux.org
Sun Dec 29 23:28:33 UTC 2019


    Date: Sunday, December 29, 2019 @ 23:28:33
  Author: foutrelis
Revision: 372355

archrelease: copy trunk to staging-x86_64

Added:
  shiboken2/repos/staging-x86_64/
  shiboken2/repos/staging-x86_64/PKGBUILD
    (from rev 372354, shiboken2/trunk/PKGBUILD)
  shiboken2/repos/staging-x86_64/shiboken-fix-falkon.patch
    (from rev 372354, shiboken2/trunk/shiboken-fix-falkon.patch)

---------------------------+
 PKGBUILD                  |   53 ++++++++++++++++++++++++++++++++++++++++++++
 shiboken-fix-falkon.patch |   46 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+)

Copied: shiboken2/repos/staging-x86_64/PKGBUILD (from rev 372354, shiboken2/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2019-12-29 23:28:33 UTC (rev 372355)
@@ -0,0 +1,53 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=shiboken2
+pkgname=(shiboken2 python-shiboken2)
+_qtver=5.14.0
+_clangver=9.0.1
+pkgver=${_qtver/-/}
+pkgrel=3
+arch=(x86_64)
+url='https://www.qt.io'
+license=(GPL2 LGPL)
+pkgdesc='Generates bindings for C++ libraries using CPython source code'
+makedepends=(clang llvm cmake libxslt qt5-xmlpatterns python-sphinx)
+_pkgfqn=pyside-setup-opensource-src-${_qtver}
+source=("https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-$pkgver-src/${_pkgfqn}.tar.xz"
+         shiboken-fix-falkon.patch)
+sha256sums=('8c2ad1901a99165ed7bac8f522ee351ae3ebadd580024248f5a1db52e4a94b30'
+            '3093d8d9e76bffce4e9fc16a620f9401749efff8b4d7e26c57d09f5342040627')
+
+prepare() {
+  mkdir -p build
+
+  cd $_pkgfqn
+  patch -p1 -i ../shiboken-fix-falkon.patch # Fix loading Falkon plugins
+}
+
+build() {
+  cd build
+  cmake ../${_pkgfqn}/sources/shiboken2 \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DBUILD_TESTS=OFF \
+    -DUSE_PYTHON_VERSION=3
+  make
+}
+
+package_shiboken2() {
+  depends=(clang=$_clangver llvm libxslt qt5-xmlpatterns)
+
+  cd build
+  make DESTDIR="$pkgdir" install
+# Provided in python-shiboken2
+  rm -r "$pkgdir"/usr/lib/{python*,libshiboken*}
+}
+
+package_python-shiboken2() {
+  depends=(python)
+
+  cd build
+  make DESTDIR="$pkgdir" install
+# Provided in shiboken2
+  rm -r "$pkgdir"/usr/{bin,include,lib/{cmake,pkgconfig},share}
+}

Copied: shiboken2/repos/staging-x86_64/shiboken-fix-falkon.patch (from rev 372354, shiboken2/trunk/shiboken-fix-falkon.patch)
===================================================================
--- staging-x86_64/shiboken-fix-falkon.patch	                        (rev 0)
+++ staging-x86_64/shiboken-fix-falkon.patch	2019-12-29 23:28:33 UTC (rev 372355)
@@ -0,0 +1,46 @@
+From 92944434452d185ef0b023abd5eec224aea7eeb2 Mon Sep 17 00:00:00 2001
+From: Christian Tismer <tismer at stackless.com>
+Date: Wed, 13 Nov 2019 19:12:16 +0100
+Subject: [PATCH] WIP: qApp: Ensure QtCore import when embedded QApplication subclass is used
+
+The qApp machinery works great with Python.
+When using embedding, things are different because there
+is no longer a wrapper layer.
+
+Unfortunately, many extension modules use C++ to derive a
+QApplication class.
+
+This has the side effect that when a foreign C++ module gets
+imported, the qApp machinery does not see it as it would
+in Python.
+
+Instead of a complex analysis, we always make sure that QtCore
+is imported. It will report the right instance, anyway.
+
+XXX make sure that this assumption is really true...
+
+Change-Id: Ie9c56ac75e6c0ae3ace615dfc26c6d218ff4efea
+Fixes: PYSIDE-1135
+---
+
+diff --git a/sources/shiboken2/libshiboken/qapp_macro.cpp b/sources/shiboken2/libshiboken/qapp_macro.cpp
+index 306f53b..c2018bd 100644
+--- a/sources/shiboken2/libshiboken/qapp_macro.cpp
++++ b/sources/shiboken2/libshiboken/qapp_macro.cpp
+@@ -246,7 +246,14 @@
+      * qApp_contents variable and assigns the instance, instead of vice-versa.
+      */
+     PyObject *coreDict = qApp_moduledicts[1];
+-    if (qApp != nullptr && coreDict != nullptr) {
++    if (coreDict == nullptr) {
++        // PYSIDE-1135: Make sure that at least QtCore gets imported.
++        // That problem exists when a derived instance is created in C++.
++        qApp_moduledicts[1] = Py_None; // anything != nullptr during import
++        coreDict = PyImport_ImportModule("PySide2.QtCore");
++        qApp_moduledicts[1] = coreDict;
++    }
++    if (qApp != nullptr && coreDict != nullptr && coreDict != Py_None) {
+         PyObject *coreApp = PyDict_GetItemString(coreDict, "QCoreApplication");
+         if (coreApp != nullptr) {
+             qApp_content = PyObject_CallMethod(coreApp, "instance", "");
+



More information about the arch-commits mailing list