1SUMMARY="A sphinx extension which renders display math in HTML via JavaScript"
2DESCRIPTION="sphinxcontrib-jsmath is a sphinx extension which renders display math in HTML via \
3JavaScript."
4HOMEPAGE="http://sphinx-doc.org/
5	https://pypi.org/project/sphinxcontrib-jsmath/"
6COPYRIGHT="2007-2019 by the Sphinx team"
7LICENSE="BSD (2-clause)"
8REVISION="1"
9SOURCE_URI="https://pypi.python.org/packages/source/s/sphinxcontrib-jsmath/sphinxcontrib-jsmath-$portVersion.tar.gz"
10CHECKSUM_SHA256="a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"
11SOURCE_DIR="sphinxcontrib-jsmath-$portVersion"
12PATCHES="10.patch" # fetched from upstream
13
14ARCHITECTURES="any"
15
16PROVIDES="
17	$portName = $portVersion
18	"
19REQUIRES="
20	haiku
21	"
22
23BUILD_REQUIRES="
24	haiku_devel
25	"
26
27PYTHON_PACKAGES=(python39 python310)
28PYTHON_VERSIONS=(3.9 3.10)
29defaultTestVersion="python39"
30for i in "${!PYTHON_PACKAGES[@]}"; do
31	pythonPackage=${PYTHON_PACKAGES[i]}
32	pythonVersion=${PYTHON_VERSIONS[$i]}
33
34	eval "PROVIDES_$pythonPackage=\"
35		${portName}_$pythonPackage = $portVersion
36		\""
37	eval "REQUIRES_$pythonPackage=\"
38		haiku
39		cmd:python$pythonVersion
40		\""
41	BUILD_REQUIRES+="
42		build_$pythonPackage
43		installer_$pythonPackage
44		setuptools_$pythonPackage
45		wheel_$pythonPackage
46		"
47	BUILD_PREREQUIRES+="
48		cmd:python$pythonVersion
49		"
50done
51
52TEST_REQUIRES="
53	sphinx_$defaultTestVersion
54	cmd:pytest
55	"
56
57INSTALL()
58{
59	for i in "${!PYTHON_PACKAGES[@]}"; do
60		pythonVersion=${PYTHON_VERSIONS[$i]}
61
62		python=python$pythonVersion
63
64		$python -m build --wheel --skip-dependency-check --no-isolation
65		$python -m installer -p $prefix dist/*.whl
66
67		packageEntries ${PYTHON_PACKAGES[i]} \
68			$prefix/lib/python*
69	done
70}
71
72TEST()
73{
74	pytest -v
75}
76