Files
alr-repo/python3-pyside6/alr.sh

182 lines
5.0 KiB
Bash

name='python3-pyside6'
version='6.9.0'
release='1'
desc='Enables the use of Qt6 APIs in Python applications.'
desc_ru='Позволяет использовать API Qt6 в Python-приложениях.'
homepage='https://github.com/mk-fg/pretty-yaml'
maintainer='Evgeniy Khramov <xpamych@yandex.ru>'
maintainer_ru='Евгений Храмов <xpamych@yandex.ru>'
architectures=('all')
license=('LGPL')
provides=(
'pyside6'
'pyside6-tools'
'shiboken6'
)
conflicts=(
'pyside6'
'pyside6-tools'
'shiboken6'
)
deps=("python3")
deps_arch=(
"clang"
"gcc-libs"
"glibc"
"libxml2"
"libxslt"
"llvm"
"python"
"qt6-base"
"gcc-libs"
"glibc"
"python"
"qt6-base"
"qt6-declarative"
"python"
)
build_deps=("python3" "python3-pip")
build_deps_arch=(
"clang"
"cmake"
"git"
"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"
)
sources=("git+https://code.qt.io/pyside/pyside-setup#tag=v$pkgver")
checksums=('a71ba1fe1e54b4819782ddddebf4a3e94c862b6e32d30be4e466fdc25365f90a')
prepare() {
cd pyside-setup
patch -p1 < ../fix-build.patch
# Install missing doc snippets
git cherry-pick -n 12aba6c4dfafe191a4640e3ab755a1c7e2ddfc44
git cherry-pick -n cacc9c5803a6dec820dd46211a836453183c8dab
}
build() {
CLANG_INSTALL_DIR="/usr" \
cmake -B build -S pyside-setup -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-DSHIBOKEN_PYTHON_LIBRARIES=`pkgconf python3-embed --libs` \
-DBUILD_TESTS=OFF \
-DFORCE_LIMITED_API=no \
-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
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"
cd pyside-setup
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 pyside-setup
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
}
package_pyside6-tools() {
pkgdesc='Tools for pyside6'
depends=(pyside6
python)
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
}
#files() {
# echo ./usr/local/bin/pyaml
# printf '"%s" ' ./usr/local/lib/python3.*/site-packages/pyaml/**/*
# printf '"%s" ' ./usr/local/lib/python3.*/site-packages/pyaml-${version}.dist-info/*
#}