[arch-commits] Commit in shiboken2/repos/testing-x86_64 (3 files)
Antonio Rojas
arojas at archlinux.org
Thu Dec 19 21:39:46 UTC 2019
Date: Thursday, December 19, 2019 @ 21:39:45
Author: arojas
Revision: 371943
archrelease: copy trunk to testing-x86_64
Added:
shiboken2/repos/testing-x86_64/PKGBUILD
(from rev 371942, shiboken2/trunk/PKGBUILD)
shiboken2/repos/testing-x86_64/shiboken-fix-falkon.patch
(from rev 371942, shiboken2/trunk/shiboken-fix-falkon.patch)
Deleted:
shiboken2/repos/testing-x86_64/PKGBUILD
---------------------------+
PKGBUILD | 101 +++++++++++++++++++++++---------------------
shiboken-fix-falkon.patch | 46 ++++++++++++++++++++
2 files changed, 99 insertions(+), 48 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-12-19 21:39:22 UTC (rev 371942)
+++ PKGBUILD 2019-12-19 21:39:45 UTC (rev 371943)
@@ -1,48 +0,0 @@
-# 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.0
-pkgver=${_qtver/-/}
-pkgrel=1
-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")
-sha256sums=('8c2ad1901a99165ed7bac8f522ee351ae3ebadd580024248f5a1db52e4a94b30')
-
-prepare() {
- mkdir -p build
-}
-
-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/testing-x86_64/PKGBUILD (from rev 371942, shiboken2/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-12-19 21:39:45 UTC (rev 371943)
@@ -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.0
+pkgver=${_qtver/-/}
+pkgrel=2
+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/testing-x86_64/shiboken-fix-falkon.patch (from rev 371942, shiboken2/trunk/shiboken-fix-falkon.patch)
===================================================================
--- shiboken-fix-falkon.patch (rev 0)
+++ shiboken-fix-falkon.patch 2019-12-19 21:39:45 UTC (rev 371943)
@@ -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