Files
haikuports/dev-python/hyperlink/hyperlink-21.0.0.recipe
Jérôme Duval df145a169a Drop python 3.7 (and 2.7) for recipes under dev-python/
Recipes with only 3.7 are left alone. Help with #8025.
2023-03-23 21:18:44 +01:00

76 lines
1.8 KiB
Bash

SUMMARY="Immutable, Pythonic, correct URLs"
DESCRIPTION="Hyperlink provides a pure-Python implementation of immutable URLs.
Based on RFC 3986 and RCF 3987, the Hyperlink URL makes working with both URIs \
and IRIs easy.
Hyperlink is tested against Python 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, and PyPy."
HOMEPAGE="https://github.com/python-hyper/hyperlink"
COPYRIGHT="2017 Glyph Lefkowitz
Itamar Turner-Trauring
Jean Paul Calderone
Adi Roiban
Amber Hawkie Brown
Mahmoud Hashemi
Wilfredo Sanchez Vega et all"
LICENSE="MIT
Public Domain"
REVISION="2"
SOURCE_URI="$HOMEPAGE/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="6fdef854115f413e5d8a0241e1e67e93f0bd29c1d1317a742f3fdb189e1d57b5"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python38 python39 python310)
PYTHON_VERSIONS=(3.8 3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\n\
cmd:projectx\n\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
idna_$pythonPackage\n\
cmd:python$pythonVersion\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$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"
install -m 755 -d "$docDir"
install -m 644 -t "$docDir" README.md
packageEntries $pythonPackage \
"$prefix"/lib/$python \
"$docDir"
done
}