0
0
Fork 0
haikuports/dev-python/pyyaml/pyyaml-5.1.2.recipe

75 lines
1.9 KiB
Bash

SUMMARY="YAML parser and emitter for Python"
DESCRIPTION="
YAML is a data serialization format designed for human readability \
and interaction with scripting languages. \
PyYAML is a YAML parser and emitter for Python.
PyYAML features a complete YAML 1.1 parser, Unicode support, \
pickle support, capable extension API, and sensible error messages. \
PyYAML supports standard YAML tags and \
provides Python-specific tags that allow to represent an arbitrary Python object.
PyYAML is applicable for a broad range of tasks from \
complex configuration files to object serialization and persistance.
"
HOMEPAGE="https://pyyaml.org/"
COPYRIGHT="2006-2019 Kirill Simonov"
LICENSE="MIT"
REVISION="2"
SOURCE_URI="http://pyyaml.org/download/pyyaml/PyYAML-$portVersion.tar.gz"
CHECKSUM_SHA256="01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4"
SOURCE_DIR="PyYAML-$portVersion"
ARCHITECTURES="all"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:gcc
"
PYTHON_PACKAGES=(python python3 python38 python39)
PYTHON_VERSIONS=(2.7 3.7 3.8 3.9)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\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
packageEntries $pythonPackage \
$prefix/lib/python*
done
}