summaryrefslogtreecommitdiff
path: root/skip/python-pyside2/python-pyside2.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
committerdavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
commitf29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch)
tree76fe6267f8307e7630fc6f53ff99a9767ad40de0 /skip/python-pyside2/python-pyside2.xibuild
parent05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff)
Work
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"
+}
+