From 446ef1cf7b230ec0d958623fb0e6b3c5b984dec2 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Thu, 15 Sep 2022 10:37:58 +0200 Subject: [PATCH] hyperlink, new python recipe (#7205) --- dev-python/hyperlink/hyperlink-21.0.0.recipe | 75 ++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 dev-python/hyperlink/hyperlink-21.0.0.recipe diff --git a/dev-python/hyperlink/hyperlink-21.0.0.recipe b/dev-python/hyperlink/hyperlink-21.0.0.recipe new file mode 100644 index 000000000..3eb2f180f --- /dev/null +++ b/dev-python/hyperlink/hyperlink-21.0.0.recipe @@ -0,0 +1,75 @@ +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="1" +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=(python3 python38 python39 python310) +PYTHON_VERSIONS=(3.7 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 +}