summaryrefslogtreecommitdiff
path: root/skip/python-pyside2/python-pyside2.xibuild
blob: d2652e8bf14b43e37f866bea7c6e6f3e5da57c7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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"
}