summaryrefslogtreecommitdiff
path: root/skip/python-pyside2/python-pyside2.xibuild
diff options
context:
space:
mode:
Diffstat (limited to 'skip/python-pyside2/python-pyside2.xibuild')
-rw-r--r--skip/python-pyside2/python-pyside2.xibuild39
1 files changed, 39 insertions, 0 deletions
diff --git a/skip/python-pyside2/python-pyside2.xibuild b/skip/python-pyside2/python-pyside2.xibuild
new file mode 100644
index 0000000..d2652e8
--- /dev/null
+++ b/skip/python-pyside2/python-pyside2.xibuild
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+NAME="python-pyside2"
+DESC="Enables the use of Qt5 APIs in Python applications"
+
+MAKEDEPS=" cmake libshiboken2 qt5-qt3d qt5-qtbase qt5-qtcharts qt5-qtdatavis3d qt5-qtdeclarative qt5-qtlocation qt5-qtmultimedia qt5-qtquickcontrols2 qt5-qtremoteobjects qt5-qtscript qt5-qtscxml qt5-qtsensors qt5-qtserialport qt5-qtspeech qt5-qtsvg qt5-qttools qt5-qtwebchannel qt5-qtwebsockets qt5-qtx11extras qt5-qtxmlpatterns shiboken2 py3-setuptools qt5-qtwebengine"
+
+PKG_VER=5.15.2
+SOURCE="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-$PKG_VER-src/pyside-setup-opensource-src-$PKG_VER.tar.xz"
+
+ADDITIONAL="
+python-3.10.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=None \
+ -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+ -DBUILD_TESTS=OFF \
+ sources/pyside2
+ cmake --build build
+}
+
+package() {
+ DESTDIR="$PKG_DEST" cmake --install build
+
+ # Install egg info
+ export PATH="/usr/lib/qt5/bin:$PATH"
+ python3 setup.py egg_info --build-type=pyside2
+ pythonpath="$(python3 -c "from sysconfig import get_path; print(get_path('platlib'))")"
+ cp -r PySide2.egg-info "$PKG_DEST/$pythonpath"
+}
+