[arch-commits] Commit in shiboken2/repos/staging-x86_64 (4 files)
Evangelos Foutras
foutrelis at gemini.archlinux.org
Thu Dec 2 19:23:07 UTC 2021
Date: Thursday, December 2, 2021 @ 19:23:07
Author: foutrelis
Revision: 430379
archrelease: copy trunk to staging-x86_64
Added:
shiboken2/repos/staging-x86_64/PKGBUILD
(from rev 430378, shiboken2/trunk/PKGBUILD)
shiboken2/repos/staging-x86_64/python310.patch
(from rev 430378, shiboken2/trunk/python310.patch)
Deleted:
shiboken2/repos/staging-x86_64/PKGBUILD
shiboken2/repos/staging-x86_64/python310.patch
-----------------+
PKGBUILD | 114 ++++++++++++-------------
python310.patch | 238 +++++++++++++++++++++++++++---------------------------
2 files changed, 176 insertions(+), 176 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-12-02 19:23:03 UTC (rev 430378)
+++ PKGBUILD 2021-12-02 19:23:07 UTC (rev 430379)
@@ -1,57 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgbase=shiboken2
-pkgname=(shiboken2 python-shiboken2)
-_qtver=5.15.2
-_clangver=13.0.0
-pkgver=${_qtver/-/}
-pkgrel=12
-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
- python-wheel)
-_pkgfqn=pyside-setup-opensource-src-$_qtver
-source=("https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-$pkgver-src/${_pkgfqn}.tar.xz"
- python310.patch)
-sha256sums=('b306504b0b8037079a8eab772ee774b9e877a2d84bab2dbefbe4fa6f83941418'
- '04d4a4205e9a03d31032bf9979855d7644402466b83dccd53d4239d745c42f54')
-
-prepare() {
- cd ${_pkgfqn}
- patch -Np1 -i ../python310.patch
-}
-
-build() {
- cmake -B build -S ${_pkgfqn}/sources/shiboken2 \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_TESTS=OFF \
- -DUSE_PYTHON_VERSION=3
- cmake --build build
-}
-
-package_shiboken2() {
- depends=(clang=$_clangver llvm libxslt qt5-xmlpatterns)
-
- DESTDIR="$pkgdir" cmake --install build
-# Provided in python-shiboken2
- rm -r "$pkgdir"/usr/lib/{python*,libshiboken*}
-# Conflicts with shiboken6 and doesn't work anyway
- rm "$pkgdir"/usr/bin/shiboken_tool.py
-}
-
-package_python-shiboken2() {
- depends=(python)
-
- DESTDIR="$pkgdir" cmake --install build
-# Provided in shiboken2
- rm -r "$pkgdir"/usr/{bin,include,lib/{cmake,pkgconfig}}
-
-# Install egg-info
- cd $_pkgfqn
- python setup.py egg_info --build-type=shiboken2
- _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
- cp -r shiboken2.egg-info "$pkgdir"/$_pythonpath
-}
Copied: shiboken2/repos/staging-x86_64/PKGBUILD (from rev 430378, shiboken2/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-12-02 19:23:07 UTC (rev 430379)
@@ -0,0 +1,57 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=shiboken2
+pkgname=(shiboken2 python-shiboken2)
+_qtver=5.15.2
+_clangver=13.0.0
+pkgver=${_qtver/-/}
+pkgrel=13
+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
+ python-wheel)
+_pkgfqn=pyside-setup-opensource-src-$_qtver
+source=("https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-$pkgver-src/${_pkgfqn}.tar.xz"
+ python310.patch)
+sha256sums=('b306504b0b8037079a8eab772ee774b9e877a2d84bab2dbefbe4fa6f83941418'
+ '04d4a4205e9a03d31032bf9979855d7644402466b83dccd53d4239d745c42f54')
+
+prepare() {
+ cd ${_pkgfqn}
+ patch -Np1 -i ../python310.patch
+}
+
+build() {
+ cmake -B build -S ${_pkgfqn}/sources/shiboken2 \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_TESTS=OFF \
+ -DUSE_PYTHON_VERSION=3
+ cmake --build build
+}
+
+package_shiboken2() {
+ depends=(clang=$_clangver llvm libxslt qt5-xmlpatterns)
+
+ DESTDIR="$pkgdir" cmake --install build
+# Provided in python-shiboken2
+ rm -r "$pkgdir"/usr/lib/{python*,libshiboken*}
+# Conflicts with shiboken6 and doesn't work anyway
+ rm "$pkgdir"/usr/bin/shiboken_tool.py
+}
+
+package_python-shiboken2() {
+ depends=(python)
+
+ DESTDIR="$pkgdir" cmake --install build
+# Provided in shiboken2
+ rm -r "$pkgdir"/usr/{bin,include,lib/{cmake,pkgconfig}}
+
+# Install egg-info
+ cd $_pkgfqn
+ python setup.py egg_info --build-type=shiboken2
+ _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
+ cp -r shiboken2.egg-info "$pkgdir"/$_pythonpath
+}
Deleted: python310.patch
===================================================================
--- python310.patch 2021-12-02 19:23:03 UTC (rev 430378)
+++ python310.patch 2021-12-02 19:23:07 UTC (rev 430379)
@@ -1,119 +0,0 @@
-# Based on:
-# https://github.com/pyside/pyside-setup/commit/81e9cff884d6
-# https://github.com/pyside/pyside-setup/commit/2530cb3f165a
-
-diff -upr 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 2020-11-11 14:51:30.000000000 +0200
-+++ pyside-setup-opensource-src-5.15.2/build_scripts/config.py 2021-12-01 15:15:52.323808457 +0200
-@@ -93,6 +93,7 @@ class Config(object):
- 'Programming Language :: Python :: 3.7',
- 'Programming Language :: Python :: 3.8',
- 'Programming Language :: Python :: 3.9',
-+ 'Programming Language :: Python :: 3.10',
- ]
-
- self.setup_script_dir = None
-diff -upr pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.cpp pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/pep384impl.cpp
---- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.cpp 2020-11-11 14:51:30.000000000 +0200
-+++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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 pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.h pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/pep384impl.h
---- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.h 2020-11-11 14:51:30.000000000 +0200
-+++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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 pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/sbkstring.cpp pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/sbkstring.cpp
---- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/sbkstring.cpp 2020-11-11 14:51:30.000000000 +0200
-+++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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 pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py pyside-setup-opensource-src-5.15.2/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
---- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2020-11-11 14:51:30.000000000 +0200
-+++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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 pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py pyside-setup-opensource-src-5.15.2/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py
---- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2020-11-11 14:51:30.000000000 +0200
-+++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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
Copied: shiboken2/repos/staging-x86_64/python310.patch (from rev 430378, shiboken2/trunk/python310.patch)
===================================================================
--- python310.patch (rev 0)
+++ python310.patch 2021-12-02 19:23:07 UTC (rev 430379)
@@ -0,0 +1,119 @@
+# Based on:
+# https://github.com/pyside/pyside-setup/commit/81e9cff884d6
+# https://github.com/pyside/pyside-setup/commit/2530cb3f165a
+
+diff -upr 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 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/build_scripts/config.py 2021-12-01 15:15:52.323808457 +0200
+@@ -93,6 +93,7 @@ class Config(object):
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
++ 'Programming Language :: Python :: 3.10',
+ ]
+
+ self.setup_script_dir = None
+diff -upr pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.cpp pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/pep384impl.cpp
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.cpp 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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 pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.h pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/pep384impl.h
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/pep384impl.h 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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 pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/sbkstring.cpp pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/sbkstring.cpp
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/sbkstring.cpp 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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 pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py pyside-setup-opensource-src-5.15.2/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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 pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py pyside-setup-opensource-src-5.15.2/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py
+--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2020-11-11 14:51:30.000000000 +0200
++++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/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
More information about the arch-commits
mailing list