blob: 1a94e9637299e56833069c68ac36fc0c0bb74b5a (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
# Maintainer (arch): Antonio Rojas <arojas@archlinux.org>
# Maintainer (arch): Felix Yan <felixonmars@archlinux.org>
# Maintainer: Parabola Hackers <dev@lists.parabola.nu>
# parabola changes and rationale:
# - remove 'qt6-webengine' dependency
# - add support for armv7h and i686
pkgbase=pyside6
pkgname=(pyside6
pyside6-tools
shiboken6)
_qtver=6.6.2
_clangver=17.0.6
pkgver=${_qtver/-/}
pkgrel=2
_pkgver_i686=6.4.2
_pkgrel_i686=5.0
eval "[[ -v _pkgver_${CARCH} ]] && pkgver=\$_pkgver_${CARCH}" # our different arches do not
eval "[[ -v _pkgrel_${CARCH} ]] && pkgrel=\$_pkgrel_${CARCH}" # always roll at the same speed
arch=(x86_64)
arch+=(armv7h i686)
url='https://www.qt.io'
license=(LGPL)
makedepends=(clang
cmake
llvm
ninja
python-numpy
python-setuptools
qt6-3d
qt6-charts
qt6-connectivity
qt6-datavis3d
qt6-graphs
qt6-httpserver
qt6-location
qt6-multimedia
qt6-networkauth
qt6-positioning
qt6-quick3d
qt6-remoteobjects
qt6-scxml
qt6-sensors
qt6-serialbus
qt6-serialport
qt6-shadertools
qt6-speech
qt6-svg
qt6-tools
qt6-webchannel
qt6-webengine
qt6-websockets)
makedepends=( ${makedepends[*]/qt6-webengine/} )
_pkgfn=pyside-setup-everywhere-src-$_qtver
source=(https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-$pkgver-src/${_pkgfn}.tar.xz
fix-build.patch)
sha256sums=('14620b694d7af4c978443016292d3d2108ba5dc105f4170e3b71eadcaf04c9f0'
'77b83cb164ea87d826259864f6a81fb33199510e1948d6daaf5c8d5ab55735a7')
prepare() {
patch -d $_pkgfn -p1 < fix-build.patch
}
build() {
cmake -B build -S $_pkgfn -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-DSHIBOKEN_PYTHON_LIBRARIES=`pkgconf python3-embed --libs` \
-DBUILD_TESTS=OFF \
-DNO_QT_TOOLS=yes
PYTHONPATH="$PWD"/build/sources \
cmake --build build
}
package_shiboken6() {
pkgdesc='Generates bindings for C++ libraries using CPython source code'
depends=(clang=$_clangver
gcc-libs
glibc
libxml2
libxslt
llvm
python
qt6-base)
optdepends=('python: Python bindings')
DESTDIR="$pkgdir" cmake --install build/sources/shiboken6
# Install egg-info
export PATH="/usr/lib/qt6/bin:$PATH"
export SETUPTOOLS_USE_DISTUTILS=stdlib
cd $_pkgfn
python setup.py egg_info --build-type=shiboken6
python setup.py egg_info --build-type=shiboken6-generator
_pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
cp -r shiboken6*.egg-info "$pkgdir"/$_pythonpath
}
package_pyside6() {
pkgdesc='Enables the use of Qt6 APIs in Python applications'
depends=(gcc-libs
glibc
python
qt6-base
qt6-declarative
shiboken6)
optdepends=('qt6-3d: Qt3D bindings'
'qt6-charts: QtCharts bindings'
'qt6-connectivity: QtBluetooth and QtNfc bindings'
'qt6-datavis3d: QtDataVisualization bindings'
'qt6-graphs: QtGraphs bindings'
'qt6-httpserver: QtHttpServer bindings'
'qt6-location: QtLocation bindings'
'qt6-multimedia: QtMultimedia bindings'
'qt6-networkauth: QtNetworkAuth bindings'
'qt6-positioning: QtPositioning bindings'
'qt6-quick3d: QtQuick3D bindings'
'qt6-remoteobjects: QtRemoteObjects bindings'
'qt6-scxml: QtScxml bindings'
'qt6-sensors: QtSensors bindings'
'qt6-serialbus: QtSerialBus bindings'
'qt6-serialport: QtSerialPort bindings'
'qt6-speech: QtTextToSpeech bindings'
'qt6-svg: QtSvg bindings'
'qt6-tools: QtHelp, QtUiTools bindings'
'qt6-webchannel: QtWebChannel bindings'
#'qt6-webengine: QtWebEngine bindings'
'qt6-websockets: QtWebSockets bindings')
provides=(qt6-python-bindings)
DESTDIR="$pkgdir" cmake --install build/sources/pyside6
# Install egg-info
export PATH="/usr/lib/qt6/bin:$PATH"
cd $_pkgfn
python setup.py egg_info --build-type=pyside6
_pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
cp -r PySide6.egg-info "$pkgdir"/$_pythonpath
# Install pyi files
install -Dm644 "$srcdir"/build/sources/pyside6/PySide6/*.pyi -t "$pkgdir"/usr/lib/python*/site-packages/PySide6
}
package_pyside6-tools() {
pkgdesc='Tools for pyside6'
depends=(pyside6
python)
optdepends=('nuitka: for deploy.py')
DESTDIR="$pkgdir" cmake --install build/sources/pyside-tools
# Add convenience pyside6-designer wrapper
# Entry points in /usr/bin are not installed in the cmake build. This is the only one that does anything besides wrapping the Qt executable
echo "export LD_PRELOAD="`python -c "from sysconfig import get_config_var; print(get_config_var('LDLIBRARY'))"` > pyside6-designer
echo "exec designer6 \$@" >> pyside6-designer
install -Dm755 pyside6-designer -t "$pkgdir"/usr/bin
}
|