Files
haikuports/dev-python/markupsafe/markupsafe-2.1.3.recipe
Oscar Lesta c8d7feb3c1 markupsafe: drop Python 3.9 support.
All on-tree users (jinja, mako, and attica6 for TESTS) are 3.10
only already.
2025-09-19 22:53:14 -03:00

77 lines
1.9 KiB
Bash

SUMMARY="Safely add untrusted strings to HTML/XML markup"
DESCRIPTION="MarkupSafe implements a text object that escapes characters so it is safe to use in \
HTML and XML. Characters that have special meanings are replaced so that they display as the \
actual characters. This mitigates injection attacks, meaning untrusted user input can safely be \
displayed on a page. Escaping is implemented in C so it is as efficient as possible."
HOMEPAGE="https://palletsprojects.com/p/markupsafe/"
COPYRIGHT="2019 Armin Ronacher and contributors"
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="https://pypi.python.org/packages/source/m/markupsafe/MarkupSafe-$portVersion.tar.gz"
CHECKSUM_SHA256="af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"
SOURCE_DIR="MarkupSafe-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_$pythonPackage+=\"
markupsafe_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
$REQUIRES
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
rm -rf dist
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer --p $prefix dist/*.whl
packageEntries $pythonPackage \
"$prefix"/lib/python*
done
}