Files
haikuports/dev-python/pyqt_builder/pyqt_builder-1.7.0.recipe
OscarL b8d44be4ad pyqt_builder: drop support for Python 3.8. (#8686)
We don't have a sip_python38 anymore, and all users of this recipe
are using the 3.9 version already.
2023-05-19 14:28:59 +02:00

85 lines
2.0 KiB
Bash

SUMMARY="The PEP 517 Compliant PyQt Build System"
DESCRIPTION="\
PyQt-builder is the PEP 517 compliant build system for PyQt and projects that \
extend PyQt. It extends the sip build system and uses Qt's ``qmake`` to \
perform the actual compilation and installation of extension modules."
HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/"
COPYRIGHT="2020 Riverbank Computing Limited"
LICENSE="BSD (2-clause)"
REVISION="4"
SOURCE_URI="https://pypi.io/packages/source/P/PyQt-builder/PyQt-builder-$portVersion.tar.gz"
CHECKSUM_SHA256="b6e3c826f98ff4006ecb34df491ac6062a023b63a32e9f9f50904867aff72f2e"
SOURCE_DIR="PyQt-builder-$portVersion"
ARCHITECTURES="any"
PROVIDES="
pyqt_builder = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python39)
PYTHON_VERSIONS=(3.9)
defaultVersion=3.9
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
cmd:pyqt_bundle_$pythonVersion
\""
if [ $pythonVersion = $defaultVersion ]; then
eval "PROVIDES_$pythonPackage+=\"
cmd:pyqt_bundle
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku
sip_$pythonPackage
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation
rm -rf build
mkdir -p "$installLocation"
$python setup.py build install --root=/ --prefix="$prefix"
mv "$prefix"/bin/pyqt-bundle $binDir/pyqt-bundle-$pythonVersion
if [ $pythonVersion = $defaultVersion ]; then
ln -sr $binDir/pyqt-bundle-$pythonVersion $binDir/pyqt-bundle
fi
packageEntries $pythonPackage \
"$prefix"/lib/$python \
$binDir
done
}