1SUMMARY="Hyperfast and lightweight templating for the Python platform"
2DESCRIPTION="Mako is a template library written in Python. It provides a \
3familiar, non-XML syntax which compiles into Python modules for maximum \
4performance. Mako's syntax and API borrows from the best ideas of many \
5others, including Django and Jinja2 templates, Cheetah, Myghty, and Genshi.
6
7Conceptually, Mako is an embedded Python (i.e. Python Server Page) language, \
8which refines the familiar ideas of componentized layout and inheritance to \
9produce one of the most straightforward and flexible models available, while \
10also maintaining close ties to Python calling and scoping semantics."
11HOMEPAGE="http://www.makotemplates.org"
12COPYRIGHT="2006-2015 the Mako authors and contributors"
13LICENSE="MIT"
14REVISION="7"
15SOURCE_URI="https://pypi.python.org/packages/source/M/Mako/Mako-$portVersion.tar.gz"
16CHECKSUM_SHA256="3724869b363ba630a272a5f89f68c070352137b8fd1757650017b7e06fda163f"
17SOURCE_DIR="Mako-$portVersion"
18
19ARCHITECTURES="any"
20
21PROVIDES="
22	$portName = $portVersion
23	"
24REQUIRES="
25	haiku
26	"
27
28BUILD_REQUIRES="
29	haiku_devel
30	"
31
32PYTHON_PACKAGES=(python39 python310)
33PYTHON_VERSIONS=(3.9 3.10)
34for i in "${!PYTHON_PACKAGES[@]}"; do
35pythonPackage=${PYTHON_PACKAGES[i]}
36pythonVersion=${PYTHON_VERSIONS[$i]}
37eval "PROVIDES_${pythonPackage}=\"\
38	${portName}_$pythonPackage = $portVersion\n\
39	cmd:mako_render$pythonVersion\n\
40	\"; \
41REQUIRES_$pythonPackage=\"\
42	haiku\n\
43	importlib_metadata_$pythonPackage
44	pygments_$pythonPackage
45	markupsafe_$pythonPackage
46	cmd:python$pythonVersion\
47	\""
48BUILD_REQUIRES="$BUILD_REQUIRES
49	setuptools_$pythonPackage"
50BUILD_PREREQUIRES="$BUILD_PREREQUIRES
51	cmd:python$pythonVersion"
52done
53
54INSTALL()
55{
56	for i in "${!PYTHON_PACKAGES[@]}"; do
57		pythonPackage=${PYTHON_PACKAGES[i]}
58		pythonVersion=${PYTHON_VERSIONS[$i]}
59
60		python=python$pythonVersion
61		installLocation=$prefix/lib/$python/vendor-packages/
62		export PYTHONPATH=$installLocation:$PYTHONPATH
63		mkdir -p $installLocation
64		rm -rf build
65		$python setup.py build install \
66			--root=/ --prefix=$prefix
67		if [ $pythonPackage != python ]; then
68			mv $binDir/mako-render $binDir/mako-render$pythonVersion
69		fi
70		packageEntries  $pythonPackage \
71			$prefix/lib/python* \
72			$binDir
73	done
74}
75