Files
haikuports/dev-python/pythonzeroconf/pythonzeroconf-0.29.0.recipe
OscarL 7982faf80f pythonzeroconf: cleanup, support Python 3.10. (#9455)
Just the necessary bits to get it to work with Python 3.10.

Not updating to the latest version, for now at least, as that
requires building it with `poetry` (which we currently do not have).
2023-09-19 10:28:12 +02:00

67 lines
1.6 KiB
Bash

SUMMARY="A Python module for Multicast DNS Service Discovery"
DESCRIPTION="This is fork of pyzeroconf, Multicast DNS Service Discovery for Python."
HOMEPAGE="https://github.com/jstasiak/python-zeroconf/"
COPYRIGHT="2003 Paul Scott-Murphy
2014 William McBrine"
LICENSE="GNU LGPL v2.1"
REVISION="4"
SOURCE_URI="https://github.com/jstasiak/python-zeroconf/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="b8e7c55f36973362314b7d8cf716a76afea3c91abe9d2f435329dc67b973fe06"
SOURCE_FILENAME="zeroconf-$portVersion.tar.gz"
SOURCE_DIR="python-zeroconf-$portVersion"
ARCHITECTURES="any"
PROVIDES="
pythonzeroconf = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python39 python310)
PYTHON_VERSIONS=(3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[i]}
eval "PROVIDES_$pythonPackage=\"
pythonzeroconf_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
ifaddr_$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:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}