Files
haikuports/dev-python/pyyaml/pyyaml-6.0.recipe
2025-07-24 01:02:28 -03:00

79 lines
1.8 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="2017-2021 Ingy döt Net
2006-2016 Kirill Simonov"
LICENSE="MIT"
REVISION="4"
SOURCE_URI="https://github.com/yaml/pyyaml/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="f33eaba25d8e0c1a959bbf00655198c287dfc5868f5b7b01e401eaa1796cc778"
SOURCE_FILENAME="pyyaml-$portVersion.tar.gz"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:gcc
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
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
}