python3-pyside2: remove package

no longer needed by any other packages
This commit is contained in:
classabbyamp 2024-11-20 22:00:11 -05:00 committed by classabbyamp
parent e90ef7f5da
commit d2d2a58f45
16 changed files with 4 additions and 663 deletions

View File

@ -1658,7 +1658,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
libpyside2.so.5.15 libpyside2-python3-5.15.0_1
libupsclient.so.6 libnetwork-ups-tools-2.8.0_1
libnutclient.so.2 libnetwork-ups-tools-2.8.0_1
libnutscan.so.2 libnetwork-ups-tools-2.8.0_1

View File

@ -1 +0,0 @@
python3-pyside2

View File

@ -1 +0,0 @@
python3-pyside2

View File

@ -1 +0,0 @@
python3-pyside2

View File

@ -1,15 +0,0 @@
This is a terrible hack. PySide2 fails to build with Qt5 (even on Py3.11)
because shiboken can't find private interfaces for QtQuick widgets. Brute-force
the necessary include paths to make the build work.
--- ./sources/pyside2/cmake/Macros/PySideModules.cmake.orig 2023-09-27 23:51:40.096157231 -0400
+++ ./sources/pyside2/cmake/Macros/PySideModules.cmake 2023-09-27 23:52:19.825408838 -0400
@@ -93,7 +93,7 @@
# Contains include directories to pass to shiboken's preprocessor.
# Workaround: Added ${QT_INCLUDE_DIR}/QtCore until
# qtdeclarative/8d560d1bf0a747bf62f73fad6b6774095442d9d2 has reached qt5.git
- string(REPLACE ";" ${PATH_SEP} core_includes "${Qt5Core_INCLUDE_DIRS}")
+ string(REPLACE ";" ${PATH_SEP} core_includes "${Qt5Core_INCLUDE_DIRS};${Qt5Quick_PRIVATE_INCLUDE_DIRS}")
set(shiboken_include_dirs ${pyside2_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${core_includes})
set(shiboken_framework_include_dirs_option "")
if(CMAKE_HOST_APPLE)

View File

@ -1,11 +0,0 @@
--- a/sources/pyside2/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside2/cmake/Macros/PySideModules.cmake
@@ -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};${Qt5Quick_PRIVATE_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}")

View File

@ -1,31 +0,0 @@
pyside2 cmake code does not handle crossbuild while generating pyi files.
(stub files for type checker).
From now, disable their generation.
--- a/sources/pyside2/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside2/cmake/Macros/PySideModules.cmake
@@ -201,18 +201,24 @@
endif()
# Add target to generate pyi file, which depends on the module target.
+ if(NOT CMAKE_CROSSCOMPILING)
add_custom_target("${module_NAME}_pyi" ALL
COMMAND ${CMAKE_COMMAND} -E env ${ld_prefix}
"${SHIBOKEN_PYTHON_INTERPRETER}"
"${CMAKE_CURRENT_SOURCE_DIR}/../support/generate_pyi.py" ${generate_pyi_options})
add_dependencies("${module_NAME}_pyi" ${module_NAME})
+ else()
+ message(STATUS "crossbuild: disable generation of ${module_NAME}_pyi")
+ endif()
# install
install(TARGETS ${module_NAME} LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}/PySide2")
+ if(NOT CMAKE_CROSSCOMPILING)
file(GLOB hinting_stub_files RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/PySide2" "${CMAKE_CURRENT_BINARY_DIR}/PySide2/*.pyi")
install(FILES ${hinting_stub_files}
DESTINATION "${PYTHON_SITE_PACKAGES}/PySide2")
+ endif()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide2/${module_NAME}/pyside2_${lower_module_name}_python.h
DESTINATION include/PySide2${pyside2_SUFFIX}/${module_NAME}/)

View File

@ -1,26 +0,0 @@
As for shiboken2 package, makes file naming consistent across architectures for
so libs and cmake files: removes intermediate suffix like ".cpython-36m-x86_64-linux-gnu".
Avoid overwriting the "real" cmake file with the generic wrapper's one (same
name in such a case)
--- a/sources/pyside2/libpyside/CMakeLists.txt
+++ b/sources/pyside2/libpyside/CMakeLists.txt
@@ -177,8 +177,6 @@
PATH_VARS PYSIDE_PYTHONPATH PYSIDE_TYPESYSTEMS PYSIDE_GLUE
)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide2Config.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/PySide2Config.cmake" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide2ConfigVersion.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/PySide2ConfigVersion.cmake" @ONLY)
@@ -195,9 +193,6 @@
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside2${pyside2_SUFFIX}.pc"
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide2Config.cmake"
- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")
-
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/install/PySide2Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")

View File

@ -1,211 +0,0 @@
From b64ad27d8dfeeecaaa8a98051252a32c9d998df4 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Thu, 9 Jun 2022 16:50:41 +0200
Subject: [PATCH] libshiboken: Fix a crash in Shiboken::Object::isValid() for
Python 3.11
The function is passed type objects for class methods, which caused
it to crash.
The first clause did not catch this, and so it was cast to SbkObject
below.
Add a type check to prevent this.
Pick-to: 6.3 6.2 5.15
Task-number: PYSIDE-1960
Change-Id: Icfdd6fefb7156ac5961444bd5395109849a1d66e
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
---
sources/shiboken2/libshiboken/basewrapper.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
index d866d13..19418c8 100644
--- a/sources/shiboken2/libshiboken/basewrapper.cpp
+++ b/sources/shiboken2/libshiboken/basewrapper.cpp
@@ -1468,6 +1468,7 @@ bool setCppPointer(SbkObject *sbkObj, PyTypeObject *desiredType, void *cptr)
bool isValid(PyObject *pyObj)
{
if (!pyObj || pyObj == Py_None
+ || PyType_Check(pyObj) != 0
|| Py_TYPE(Py_TYPE(pyObj)) != SbkObjectType_TypeF()) {
return true;
}
--
2.35.3
From 77fdd690ca14e97b4c800c4127362ca0c83a716a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 9 Jun 2022 13:45:07 +0200
Subject: [PATCH] Fix usage of Py_TYPE() for Python 3.11
The macro was changed to a function, no longer allowing for assignment.
---
sources/pyside2/libpyside/pysideqflags.cpp | 2 +-
sources/pyside2/libpyside/pysidesignal.cpp | 2 +-
sources/pyside2/libpyside/pysideweakref.cpp | 2 +-
sources/shiboken2/libshiboken/basewrapper.cpp | 4 ++--
sources/shiboken2/libshiboken/sbkenum.cpp | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sources/pyside2/libpyside/pysideqflags.cpp b/sources/pyside2/libpyside/pysideqflags.cpp
index b141ce1..ef0c8f4 100644
--- a/sources/pyside2/libpyside/pysideqflags.cpp
+++ b/sources/pyside2/libpyside/pysideqflags.cpp
@@ -187,7 +187,7 @@ namespace QFlags
}
newspec.slots = SbkNewQFlagsType_spec.slots;
PyTypeObject *type = (PyTypeObject *)SbkType_FromSpec(&newspec);
- Py_TYPE(type) = &PyType_Type;
+ Py_SET_TYPE(type, &PyType_Type);
PySideQFlagsType *flagsType = reinterpret_cast<PySideQFlagsType *>(type);
PepType_PFTP(flagsType)->converterPtr = &PepType_PFTP(flagsType)->converter;
diff --git a/sources/pyside2/libpyside/pysidesignal.cpp b/sources/pyside2/libpyside/pysidesignal.cpp
index 5c03031..5e42dba 100644
--- a/sources/pyside2/libpyside/pysidesignal.cpp
+++ b/sources/pyside2/libpyside/pysidesignal.cpp
@@ -162,7 +162,7 @@ PyTypeObject *PySideSignalTypeF(void)
if (!type) {
type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&PySideSignalType_spec));
PyTypeObject *hold = Py_TYPE(type);
- Py_TYPE(type) = PySideMetaSignalTypeF();
+ Py_SET_TYPE(type, PySideMetaSignalTypeF());
Py_INCREF(Py_TYPE(type));
Py_DECREF(hold);
}
diff --git a/sources/pyside2/libpyside/pysideweakref.cpp b/sources/pyside2/libpyside/pysideweakref.cpp
index cd90634..730990f 100644
--- a/sources/pyside2/libpyside/pysideweakref.cpp
+++ b/sources/pyside2/libpyside/pysideweakref.cpp
@@ -90,7 +90,7 @@ PyObject *create(PyObject *obj, PySideWeakRefFunction func, void *userData)
if (Py_TYPE(PySideCallableObjectTypeF()) == 0)
{
- Py_TYPE(PySideCallableObjectTypeF()) = &PyType_Type;
+ Py_SET_TYPE(PySideCallableObjectTypeF(), &PyType_Type);
PyType_Ready(PySideCallableObjectTypeF());
}
diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
index 19418c8..0cc6fad 100644
--- a/sources/shiboken2/libshiboken/basewrapper.cpp
+++ b/sources/shiboken2/libshiboken/basewrapper.cpp
@@ -366,7 +366,7 @@ SbkObjectType *SbkObject_TypeF(void)
static PyTypeObject *type = nullptr;
if (!type) {
type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&SbkObject_Type_spec));
- Py_TYPE(type) = SbkObjectType_TypeF();
+ Py_SET_TYPE(type, SbkObjectType_TypeF());
Py_INCREF(Py_TYPE(type));
type->tp_weaklistoffset = offsetof(SbkObject, weakreflist);
type->tp_dictoffset = offsetof(SbkObject, ob_dict);
@@ -1110,7 +1110,7 @@ introduceWrapperType(PyObject *enclosingObject,
typeSpec->slots[0].pfunc = reinterpret_cast<void *>(baseType ? baseType : SbkObject_TypeF());
PyObject *heaptype = SbkType_FromSpecWithBases(typeSpec, baseTypes);
- Py_TYPE(heaptype) = SbkObjectType_TypeF();
+ Py_SET_TYPE(heaptype, SbkObjectType_TypeF());
Py_INCREF(Py_TYPE(heaptype));
auto *type = reinterpret_cast<SbkObjectType *>(heaptype);
#if PY_VERSION_HEX < 0x03000000
diff --git a/sources/shiboken2/libshiboken/sbkenum.cpp b/sources/shiboken2/libshiboken/sbkenum.cpp
index 369b264..edcdc16 100644
--- a/sources/shiboken2/libshiboken/sbkenum.cpp
+++ b/sources/shiboken2/libshiboken/sbkenum.cpp
@@ -753,7 +753,7 @@
PyTuple_SetItem(bases, 0, reinterpret_cast<PyObject *>(basetype));
auto *type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpecWithBases(&newspec, bases));
PyErr_Print();
- Py_TYPE(type) = SbkEnumType_TypeF();
+ Py_SET_TYPE(type, SbkEnumType_TypeF());
auto *enumType = reinterpret_cast<SbkEnumType *>(type);
PepType_SETP(enumType)->cppName = cppName;
--
2.35.3
From a09a1db8391243e6bb290ee66bb6e3afbb114c61 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Fri, 24 Jun 2022 09:22:01 +0200
Subject: libshiboken: Fix crashes with static strings in Python 3.11
In Python 3.11, some strings come with a refcount above decimal
1000000000, apparently indicating that they are interned. Replace the
mechanism by PyUnicode_InternFromString().
Task-number: PYSIDE-1960
Pick-to: 6.3 6.2 5.15
Change-Id: I6436afee351f89da5814b5d6bc76970b1b508168
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Upstream: https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=a09a1db8391243e6bb290ee66bb6e3afbb114c61
---
sources/shiboken6/libshiboken/sbkstring.cpp | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/sources/shiboken6/libshiboken/sbkstring.cpp b/sources/shiboken6/libshiboken/sbkstring.cpp
index 7fd20173c..36fe50369 100644
--- a/sources/shiboken2/libshiboken/sbkstring.cpp
+++ b/sources/shiboken2/libshiboken/sbkstring.cpp
@@ -5,8 +5,14 @@
#include "sbkstaticstrings_p.h"
#include "autodecref.h"
-#include <vector>
-#include <unordered_set>
+#if PY_VERSION_HEX >= 0x030B0000 || defined(Py_LIMITED_API)
+# define USE_INTERN_STRINGS
+#endif
+
+#ifndef USE_INTERN_STRINGS
+# include <vector>
+# include <unordered_set>
+#endif
namespace Shiboken
{
@@ -179,6 +185,13 @@ Py_ssize_t len(PyObject *str)
// PyObject *attr = PyObject_GetAttr(obj, name());
//
+#ifdef USE_INTERN_STRINGS
+PyObject *createStaticString(const char *str)
+{
+ return PyUnicode_InternFromString(str);
+}
+#else
+
using StaticStrings = std::unordered_set<PyObject *>;
static void finalizeStaticStrings(); // forward
@@ -225,6 +238,8 @@ PyObject *createStaticString(const char *str)
return result;
}
+#endif // !USE_INTERN_STRINGS
+
///////////////////////////////////////////////////////////////////////
//
// PYSIDE-1019: Helper function for snake_case vs. camelCase names
--
cgit v1.2.1
From 0000000000000000000000000000000000000000 Wed Jun 29 00:00:00 2022
From: Petr Viktorin <pviktori@redhat.com>
Subject: Enable building for Python 3.11
diff -rU3 pyside-setup-opensource-src-5.15.2-orig/build_scripts/config.py pyside-setup-opensource-src-5.15.2/build_scripts/config.py
--- pyside-setup-opensource-src-5.15.2-orig/build_scripts/config.py 2022-01-05 14:26:23.000000000 +0100
+++ pyside-setup-opensource-src-5.15.2/build_scripts/config.py 2022-06-29 14:38:24.918102384 +0200
@@ -94,6 +94,7 @@
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
]
self.setup_script_dir = None

View File

@ -1,152 +0,0 @@
This is a combination of three patches:
1. In generate_pyi.py, avoid writing to immutable typing.TypeVar.__repr__.
2. Backport PySide6 fix https://codereview.qt-project.org/c/pyside/pyside-setup/+/506424
3. Backport PySide6 fix https://codereview.qt-project.org/c/pyside/pyside-setup/+/506930
diff -ur python3-pyside2-5.15.5.orig/sources/pyside2/libpyside/pysideproperty.cpp python3-pyside2-5.15.5/sources/pyside2/libpyside/pysideproperty.cpp
--- python3-pyside2-5.15.5.orig/sources/pyside2/libpyside/pysideproperty.cpp 2023-09-27 21:52:01.389249419 -0400
+++ python3-pyside2-5.15.5/sources/pyside2/libpyside/pysideproperty.cpp 2023-09-27 21:57:06.265042322 -0400
@@ -46,6 +46,7 @@
#include <shiboken.h>
#include <signature.h>
+#include <basewrapper.h>
using namespace Shiboken;
@@ -444,7 +445,13 @@
static PyObject *getFromType(PyTypeObject *type, PyObject *name)
{
PyObject *attr = nullptr;
- attr = PyDict_GetItem(type->tp_dict, name);
+
+ {
+ Shiboken::Type::TypeDict tpDict(type);
+ Q_ASSERT(tpDict);
+ attr = PyDict_GetItem(tpDict, name);
+ }
+
if (!attr) {
PyObject *bases = type->tp_bases;
int size = PyTuple_GET_SIZE(bases);
diff -ur python3-pyside2-5.15.5.orig/sources/pyside2/libpyside/pysidesignal.cpp python3-pyside2-5.15.5/sources/pyside2/libpyside/pysidesignal.cpp
--- python3-pyside2-5.15.5.orig/sources/pyside2/libpyside/pysidesignal.cpp 2023-09-27 21:52:01.387249407 -0400
+++ python3-pyside2-5.15.5/sources/pyside2/libpyside/pysidesignal.cpp 2023-09-27 21:58:42.799610013 -0400
@@ -49,6 +49,7 @@
#include <QtCore/QMetaMethod>
#include <QtCore/QMetaObject>
#include <signature.h>
+#include <basewrapper.h>
#include <algorithm>
#include <utility>
@@ -670,7 +671,10 @@
PyObject *value;
PyObject *key;
- while (PyDict_Next(objType->tp_dict, &pos, &key, &value)) {
+ Shiboken::Type::TypeDict tpDict(objType);
+ Q_ASSERT(tpDict);
+
+ while (PyDict_Next(tpDict, &pos, &key, &value)) {
if (PyObject_TypeCheck(value, PySideSignalTypeF())) {
Shiboken::AutoDecRef signalInstance(reinterpret_cast<PyObject *>(PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF())));
instanceInitialize(signalInstance.cast<PySideSignalInstance *>(), key, reinterpret_cast<PySideSignal *>(value), source, 0);
diff -ur python3-pyside2-5.15.5.orig/sources/shiboken2/libshiboken/basewrapper.cpp python3-pyside2-5.15.5/sources/shiboken2/libshiboken/basewrapper.cpp
--- python3-pyside2-5.15.5.orig/sources/shiboken2/libshiboken/basewrapper.cpp 2023-09-27 21:52:01.414249566 -0400
+++ python3-pyside2-5.15.5/sources/shiboken2/libshiboken/basewrapper.cpp 2023-09-27 21:55:00.575303169 -0400
@@ -1969,3 +1969,23 @@
} // namespace Object
} // namespace Shiboken
+
+namespace Shiboken::Type
+{
+
+TypeDict::TypeDict(PyTypeObject *t) noexcept :
+ m_pyObj(t->tp_dict)
+{
+ if (m_pyObj == nullptr) {
+ m_pyObj = PyObject_GenericGetDict(reinterpret_cast<PyObject *>(t), nullptr);
+ m_owned = true;
+ }
+}
+
+TypeDict::~TypeDict()
+{
+ if (m_owned)
+ Py_DECREF(m_pyObj);
+}
+
+} // namespace Shiboken::Type
diff -ur python3-pyside2-5.15.5.orig/sources/shiboken2/libshiboken/basewrapper.h python3-pyside2-5.15.5/sources/shiboken2/libshiboken/basewrapper.h
--- python3-pyside2-5.15.5.orig/sources/shiboken2/libshiboken/basewrapper.h 2023-09-27 21:52:01.416249578 -0400
+++ python3-pyside2-5.15.5/sources/shiboken2/libshiboken/basewrapper.h 2023-09-27 21:54:17.907052245 -0400
@@ -486,4 +486,33 @@
} // namespace Shiboken
+namespace Shiboken::Type
+{
+
+/// TypeDict holds the tp_dict of a type. As of Python 3.12, tp_dict is nullptr,
+/// so, PyObject_GenericGetDict() needs to be used and the reference managed.
+/// FIXME: Replace by AutoDecRef when Python 3.12 is the minimum supported.
+class LIBSHIBOKEN_API TypeDict
+{
+public:
+ TypeDict(const TypeDict &) = delete;
+ TypeDict(TypeDict &&) = delete;
+ TypeDict &operator=(const TypeDict &) = delete;
+ TypeDict &operator=(TypeDict &&) = delete;
+
+ explicit TypeDict(PyTypeObject *t) noexcept;
+ ~TypeDict();
+
+ inline PyObject *object() { return m_pyObj; }
+ inline operator PyObject *() { return m_pyObj; }
+ inline operator bool() const { return m_pyObj != nullptr; }
+ inline PyObject *operator->() { return m_pyObj; }
+
+private:
+ PyObject *m_pyObj;
+ bool m_owned = false;
+};
+
+} // namespace Shiboken::Type
+
#endif // BASEWRAPPER_H
diff -ur python3-pyside2-5.15.5.orig/sources/shiboken2/libshiboken/signature/signature_helper.cpp python3-pyside2-5.15.5/sources/shiboken2/libshiboken/signature/signature_helper.cpp
--- python3-pyside2-5.15.5.orig/sources/shiboken2/libshiboken/signature/signature_helper.cpp 2023-09-27 21:52:01.417249584 -0400
+++ python3-pyside2-5.15.5/sources/shiboken2/libshiboken/signature/signature_helper.cpp 2023-09-27 22:00:12.347136628 -0400
@@ -50,6 +50,7 @@
#include "sbkstring.h"
#include "sbkstaticstrings.h"
#include "sbkstaticstrings_p.h"
+#include "basewrapper.h"
#include "signature_p.h"
@@ -105,7 +106,8 @@
*/
assert(PyType_Check(type));
PyType_Ready(type);
- PyObject *dict = type->tp_dict;
+ Shiboken::Type::TypeDict dict(type);
+ assert(dict);
for (; gsp->name != nullptr; gsp++) {
PyObject *have_descr = PyDict_GetItemString(dict, gsp->name);
if (have_descr != nullptr) {
--- python3-pyside2-5.15.5.orig/sources/pyside2/PySide2/support/generate_pyi.py.orig 2023-09-27 22:20:58.761497093 -0400
+++ python3-pyside2-5.15.5/sources/pyside2/PySide2/support/generate_pyi.py 2023-09-27 22:21:27.701667008 -0400
@@ -113,9 +113,6 @@
prefix = '~'
return prefix + self.__name__
"""
- def _typevar__repr__(self):
- return "typing." + self.__name__
- typing.TypeVar.__repr__ = _typevar__repr__
# Adding a pattern to substitute "Union[T, NoneType]" by "Optional[T]"
# I tried hard to replace typing.Optional by a simple override, but

View File

@ -1,14 +0,0 @@
Reported upstream: https://bugreports.qt.io/browse/PYSIDE-1430
--- a/sources/pyside2/tests/CMakeLists.txt 2020-11-11 13:51:30.000000000 +0100
+++ b/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)

View File

@ -1,74 +0,0 @@
Disable failing tests. Almost of these are related to OpenGL that is
unsupported by vnc virtual backend.
Raw testing Status: 98% tests passed, 9 tests failed out of 471
--- a/sources/pyside2/tests/QtDataVisualization/CMakeLists.txt
+++ b/sources/pyside2/tests/QtDataVisualization/CMakeLists.txt
@@ -1 +0,0 @@
-PYSIDE_TEST(datavisualization_test.py)
--- a/sources/pyside2/tests/QtGui/CMakeLists.txt
+++ b/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)
--- a/sources/pyside2/tests/QtOpenGL/CMakeLists.txt
+++ b/sources/pyside2/tests/QtOpenGL/CMakeLists.txt
@@ -1,2 +1 @@
-PYSIDE_TEST(qglbuffer_test.py)
PYSIDE_TEST(qglwidget_test.py)
--- a/sources/pyside2/tests/QtScriptTools/CMakeLists.txt
+++ b/sources/pyside2/tests/QtScriptTools/CMakeLists.txt
@@ -1 +0,0 @@
-PYSIDE_TEST(debugger_test.py)
--- a/sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt
+++ b/sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt
@@ -26,4 +26,3 @@
##
#############################################################################
-PYSIDE_TEST(web_engine_custom_scheme.py)
--- a/sources/pyside2/tests/QtWebEngineWidgets/CMakeLists.txt
+++ b/sources/pyside2/tests/QtWebEngineWidgets/CMakeLists.txt
@@ -26,4 +26,3 @@
##
#############################################################################
-PYSIDE_TEST(pyside-474-qtwebengineview.py)
--- a/sources/pyside2/tests/QtWidgets/CMakeLists.txt
+++ b/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)
--- a/sources/pyside2/tests/registry/CMakeLists.txt
+++ b/sources/pyside2/tests/registry/CMakeLists.txt
@@ -37,4 +37,3 @@
##
#############################################################################
-PYSIDE_TEST(existence_test.py)

View File

@ -1,21 +0,0 @@
tests need python modules that are not installed yet: point the built ones.
Reported upstream: https://bugreports.qt.io/browse/PYSIDE-1430
--- a/sources/pyside2/tests/init_paths.py 2020-11-11 13:51:30.000000000 +0100
+++ b/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())

View File

@ -1,101 +0,0 @@
# Template file for 'python3-pyside2'
pkgname=python3-pyside2
version=5.15.10
revision=1
_pkgname="pyside-setup-opensource-src-${version}"
build_wrksrc="sources/pyside2"
build_style=cmake
configure_args="-DPYTHON_EXECUTABLE=/usr/bin/python"
hostmakedepends="python3-setuptools shiboken2"
makedepends="python3-devel libshiboken2-devel qt5-devel
qt5-multimedia-devel qt5-tools-devel qt5-plugin-mysql qt5-plugin-odbc
qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds qt5-x11extras-devel
qt5-xmlpatterns-devel qt5-location-devel qt5-declarative-devel qt5-scxml-devel
qt5-script-devel qt5-sensors-devel qt5-speech-devel qt5-charts-devel
qt5-svg-devel qt5-datavis3d-devel qt5-webchannel-devel qt5-websockets-devel
qt5-3d-devel qt5-gamepad-devel qt5-remoteobjects-devel qt5-quickcontrols2-devel
qt5-serialport-devel
$(vopt_if webengine 'qt5-webengine-devel')"
depends="python3-shiboken2"
checkdepends="python3-distro 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=2af691d3613a41f83a60439b46568fc2c696dbfae42f7cd7b07152d115ead33a
build_options="webengine"
desc_option_webengine="Build Qt5 WebEngine bindings"
subpackages="libpyside2-python3-devel libpyside2-python3"
# needed by shiboken2 runtime
export CLANG_INSTALL_DIR=/usr
if [ ${CROSS_BUILD} ]; then
hostmakedepends+=" qt5-qmake qt5-host-tools qt5-tools qt5-remoteobjects qt5-scxml"
fi
if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then
if [ "$XBPS_TARGET_WORDSIZE" = "$XBPS_WORDSIZE" ]; then
build_options_default="webengine"
fi
fi
if [ "$build_option_webengine" ]; then
subpackages+=" python3-pyside2-webengine"
fi
pre_build() {
if [ ${CROSS_BUILD} ]; then
# make clang of shiboken aware of crossbuild
SHIBOKEN_CLANG_OPTIONS="--target=${XBPS_CROSS_TRIPLET}"
SHIBOKEN_CLANG_OPTIONS+=" --sysroot=/usr/${XBPS_CROSS_TRIPLET}"
# qt5 is built with gcc, so shiboken's clang needs gcc corresponding headers
local gcc_ver="$(${XBPS_CROSS_TRIPLET}-gcc -dumpversion)"
local inc_root="/usr/${XBPS_CROSS_TRIPLET}/usr/include/c++/${gcc_ver}"
SHIBOKEN_CLANG_OPTIONS+=" -isystem ${inc_root}"
SHIBOKEN_CLANG_OPTIONS+=" -isystem ${inc_root}/${XBPS_CROSS_TRIPLET}"
# uneeded so far
SHIBOKEN_CLANG_OPTIONS+=" -isystem ${inc_root}/backward"
export SHIBOKEN_CLANG_OPTIONS
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"
pkg_install() {
vmove "${py3_sitelib}/PySide2/QtWebEngine*"
}
}
libpyside2-python3-devel_package() {
depends="${sourcepkg}-${version}_${revision}
libpyside2-python3-${version}_${revision}"
short_desc+=" - shared library (development files)"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/share
}
}
libpyside2-python3_package() {
short_desc+=" - shared library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}

View File

@ -1,3 +0,0 @@
pkgname=pyside-setup-opensource-src
vdprefix=PySide2-
vdsuffix=-src

View File

@ -421,6 +421,8 @@ replaces="
libproxy-python<=0.4.18_1
libpurple-hangouts<=20190606_1
libpyside-python3<=5.15.0_2
libpyside2-python3-devel<=5.15.10_1
libpyside2-python3<=5.15.10_1
libqmatrixclient-devel<=0.5.3.2_1
libqmatrixclient<=0.5.3.2_1
libqzeitgeist<=0.8.0_6
@ -712,6 +714,8 @@ replaces="
python3-pyPEG2<=2.15.2_7
python3-pyenet<=5.15.0_2
python3-pyside-phonon<=5.15.0_2
python3-pyside2-webengine<=5.15.10_1
python3-pyside2<=5.15.10_1
python3-pyside<=5.15.0_2
python3-pyspotify<=2.1.3_5
python3-sabyenc3<=5.4.4_2