diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-22 14:08:05 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-22 14:08:05 +0000 |
commit | 93a93e9a3b53c1a73142a305ea1f8136846942ee (patch) | |
tree | b9791a06ab3284e27b568412c59316c66240c682 /dev-python/shiboken2 | |
parent | 2771f79232c273bc2a57d23bf335dd81ccf6af28 (diff) |
gentoo resync : 22.12.2021
Diffstat (limited to 'dev-python/shiboken2')
-rw-r--r-- | dev-python/shiboken2/Manifest | 3 | ||||
-rw-r--r-- | dev-python/shiboken2/files/shiboken2-5.15.2-python310.patch | 104 | ||||
-rw-r--r-- | dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild | 3 |
3 files changed, 108 insertions, 2 deletions
diff --git a/dev-python/shiboken2/Manifest b/dev-python/shiboken2/Manifest index 6bc060dd6184..65a1824404cd 100644 --- a/dev-python/shiboken2/Manifest +++ b/dev-python/shiboken2/Manifest @@ -1,3 +1,4 @@ +AUX shiboken2-5.15.2-python310.patch 4408 BLAKE2B cd1a5c3f8c473a6667f8c942c248285babb468339283a8cc97064bd119194b72bcdb47c758044774a415cec08562b7875fd7298dea50e23d7fc3830e8291a8c1 SHA512 10245617f1aea656d3ba2e8736d51fd119e4d01c4fff129f557203bd1d5eb40ca10b40eaf55a8bd98b56f8e2e7503028818e333fee8ec86cb7b050e48a5e0387 DIST pyside-setup-opensource-src-5.15.2.tar.xz 3472624 BLAKE2B 099abeaf25059a88f299f90b18cf79aa45acd86580c0873767b09f76268d6746cc3576743a19493a605de59b520471ddee6bba0e5340801ef44a21f2a9d41507 SHA512 5043c1c9db4ba0133baaabb4d4943182e9741b1007bedd992394758707a37bba0688dc6413ea46620e7c2fb09daa3c74e6a7bb2c302b9d08e5f3bb7575d02b62 -EBUILD shiboken2-5.15.2-r1.ebuild 6457 BLAKE2B 0ee4261ebd65c2e4e7770f7c97cf5e86bbad0843b2f0af39d54d977816b0b62026fc61c7505a759dc3c5b63acffa6182b79062e716ad22875743c1d0ef5de315 SHA512 a791464f458931c58ff9f41a436c1406e3555fac5a35eca02bf19047fd4d8f1f64f8699cdb2df5751563736ea4e263ddcaddb26d8498664872aa16136296f729 +EBUILD shiboken2-5.15.2-r1.ebuild 6505 BLAKE2B eb581933d70953b1f9b924f385cde3f203c88686bda8116c8932f09189cd2eddc4f7a5a39295b61f0247529227817b1b0b872d9267a2d31628fbd5ba26804159 SHA512 7c5e221786ec6baf9f7187da169d2e7a85b67e86b8c4a9a173f547f11760a3e9c0a9a6f6b52ec696b652d69ba5f0308554568c7a60fb3565b67b4deafef64b8e MISC metadata.xml 576 BLAKE2B 567c84dbf819c5944e5b35146e3dff7b1581aa0275a732e8f2cb6df4b32001e2020eca2469ee422bd6fdd53b34c1453db4ecbdec6e85fe5ee3e4eea4a2283336 SHA512 f1c5964cb99b61c1913b7c031b994b71948e7b26f18d4119b7b3a536bbf7e659cecf539ec54992e157170159186ede2af3b31dfa03fbc1170bc7e12c25814a31 diff --git a/dev-python/shiboken2/files/shiboken2-5.15.2-python310.patch b/dev-python/shiboken2/files/shiboken2-5.15.2-python310.patch new file mode 100644 index 000000000000..c4f582ff71de --- /dev/null +++ b/dev-python/shiboken2/files/shiboken2-5.15.2-python310.patch @@ -0,0 +1,104 @@ +diff -upr libshiboken/pep384impl.cpp libshiboken/pep384impl.cpp +--- a/libshiboken/pep384impl.cpp 2020-11-11 14:51:30.000000000 +0200 ++++ b/libshiboken/pep384impl.cpp 2021-12-01 15:17:21.444888977 +0200 +@@ -751,14 +751,14 @@ _Pep_PrivateMangle(PyObject *self, PyObj + #endif // IS_PY2 + Shiboken::AutoDecRef privateobj(PyObject_GetAttr( + reinterpret_cast<PyObject *>(Py_TYPE(self)), Shiboken::PyMagicName::name())); +-#ifndef Py_LIMITED_API +- return _Py_Mangle(privateobj, name); +-#else +- // For some reason, _Py_Mangle is not in the Limited API. Why? +- size_t plen = PyUnicode_GET_LENGTH(privateobj); ++ ++ // PYSIDE-1436: _Py_Mangle is no longer exposed; implement it always. ++ // The rest of this function is our own implementation of _Py_Mangle. ++ // Please compare the original function in compile.c . ++ size_t plen = PyUnicode_GET_LENGTH(privateobj.object()); + /* Strip leading underscores from class name */ + size_t ipriv = 0; +- while (PyUnicode_READ_CHAR(privateobj, ipriv) == '_') ++ while (PyUnicode_READ_CHAR(privateobj.object(), ipriv) == '_') + ipriv++; + if (ipriv == plen) { + Py_INCREF(name); +@@ -787,7 +787,6 @@ _Pep_PrivateMangle(PyObject *self, PyObj + if (amount > big_stack) + free(resbuf); + return result; +-#endif // else Py_LIMITED_API + } + + /***************************************************************************** +diff -upr libshiboken/pep384impl.h libshiboken/pep384impl.h +--- a/libshiboken/pep384impl.h 2020-11-11 14:51:30.000000000 +0200 ++++ b/libshiboken/pep384impl.h 2021-12-01 15:13:58.899521842 +0200 +@@ -40,6 +40,11 @@ + #ifndef PEP384IMPL_H + #define PEP384IMPL_H + ++// PYSIDE-1436: Adapt to Python 3.10 ++#if PY_VERSION_HEX < 0x030900A4 ++# define Py_SET_REFCNT(obj, refcnt) ((Py_REFCNT(obj) = (refcnt)), (void)0) ++#endif ++ + extern "C" + { + +@@ -327,7 +332,7 @@ LIBSHIBOKEN_API PyObject *PyRun_String(c + // But this is no problem as we check it's validity for every version. + + #define PYTHON_BUFFER_VERSION_COMPATIBLE (PY_VERSION_HEX >= 0x03030000 && \ +- PY_VERSION_HEX < 0x0309FFFF) ++ PY_VERSION_HEX < 0x030AFFFF) + #if !PYTHON_BUFFER_VERSION_COMPATIBLE + # error Please check the buffer compatibility for this python version! + #endif +diff -upr libshiboken/sbkstring.cpp libshiboken/sbkstring.cpp +--- a/libshiboken/sbkstring.cpp 2020-11-11 14:51:30.000000000 +0200 ++++ b/libshiboken/sbkstring.cpp 2021-12-01 15:14:47.703201473 +0200 +@@ -247,7 +247,7 @@ static void finalizeStaticStrings() + { + auto &set = staticStrings(); + for (PyObject *ob : set) { +- Py_REFCNT(ob) = 1; ++ Py_SET_REFCNT(ob, 1); + Py_DECREF(ob); + } + set.clear(); +diff -upr shibokenmodule/files.dir/shibokensupport/signature/mapping.py shibokenmodule/files.dir/shibokensupport/signature/mapping.py +--- a/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2020-11-11 14:51:30.000000000 +0200 ++++ b/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2021-12-01 15:15:14.560100869 +0200 +@@ -300,6 +300,7 @@ type_map.update({ + "zero(object)": None, + "zero(str)": "", + "zero(typing.Any)": None, ++ "zero(Any)": None, + }) + + type_map.update({ +diff -upr shibokenmodule/files.dir/shibokensupport/signature/parser.py shibokenmodule/files.dir/shibokensupport/signature/parser.py +--- a/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2020-11-11 14:51:30.000000000 +0200 ++++ b/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2021-12-01 15:25:43.267843740 +0200 +@@ -43,10 +43,11 @@ import sys + import re + import warnings + import types ++import typing + import keyword + import functools + from shibokensupport.signature.mapping import (type_map, update_mapping, +- namespace, typing, _NotCalled, ResultVariable, ArrayLikeVariable) ++ namespace, _NotCalled, ResultVariable, ArrayLikeVariable) + from shibokensupport.signature.lib.tool import (SimpleNamespace, + build_brace_pattern) + +@@ -222,7 +223,7 @@ def _resolve_arraytype(thing, line): + def to_string(thing): + if isinstance(thing, str): + return thing +- if hasattr(thing, "__name__"): ++ if hasattr(thing, "__name__") and thing.__module__ != "typing": + dot = "." in str(thing) + name = get_name(thing) + return thing.__module__ + "." + name if dot else name diff --git a/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild b/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild index 662f2d9a55ae..46a0d6c37446 100644 --- a/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild +++ b/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild @@ -14,7 +14,7 @@ EAPI=7 # https://bugreports.qt.io/browse/PYSIDE-535 # Fails to compile with python3.10 # FAILED: libshiboken/CMakeFiles/libshiboken.dir/sbkstring.cpp.o -PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_COMPAT=( python3_{8..10} ) inherit cmake llvm python-r1 toolchain-funcs @@ -60,6 +60,7 @@ DEPEND="${RDEPEND} " DOCS=( AUTHORS ) +PATCHES=( "${FILESDIR}/${P}-python310.patch" ) # Ensure the path returned by get_llvm_prefix() contains clang as well. llvm_check_deps() { |