Files
haikuports/dev-python/slixmpp/slixmpp-1.8.6.recipe

78 lines
1.9 KiB
Bash

SUMMARY="XMPP library for Python 3.7+"
DESCRIPTION="Slixmpp is an MIT licensed XMPP library for Python 3.7+. It is a \
fork of SleekXMPP.
Slixmpp's goals is to only rewrite the core of the library (the low level socket \
handling, the timers, the events dispatching) in order to remove all threads."
HOMEPAGE="https://codeberg.org/poezio/slixmpp"
COPYRIGHT="2010 Nathanael C. Fritz"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://files.pythonhosted.org/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz"
CHECKSUM_SHA256="60afcaa7c95a0fb9e7f1159cb70464a5558806d7abae29cd31e3fc883f9b8b0b"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
aiohttp_$pythonPackage
pyasn1_$pythonPackage
pyasn1_modules_$pythonPackage
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
BUILD()
{
# This is an "any" package, "building" it will create a
# "$portBaseName-$portVersion-py3-none-any.whl" file that can be installed
# on multiple Python versions, so we only need to build once.
python=python${PYTHON_VERSIONS[0]}
$python -m build --wheel --skip-dependency-check --no-isolation
}
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
# wheel filename has the pattern: $portBaseName-$portVersion-*-none-any.whl
# with the asterisk being: "py2-py3" or "py3".
$python -m installer --p $prefix dist/$portName-$portVersion-*-none-any.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}