mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
hyperlink, new python recipe (#7205)
This commit is contained in:
75
dev-python/hyperlink/hyperlink-21.0.0.recipe
Normal file
75
dev-python/hyperlink/hyperlink-21.0.0.recipe
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user