1SUMMARY="A library for installing Python wheels"
2DESCRIPTION="This is a low-level library for installing a Python package from a wheel distribution.
3It provides basic functionality and abstractions for handling wheels and installing packages from \
4wheels.
5
6- Logic for unpacking a wheel (i.e. installation).
7- Abstractions for various parts of the unpacking process.
8- Extensible simple implementations of the abstractions.
9- Platform-independent Python script wrapper generation."
10HOMEPAGE="https://pypi.org/project/installer/"
11COPYRIGHT="2020 Pradyun Gedam"
12LICENSE="MIT"
13REVISION="4"
14SOURCE_URI="https://pypi.io/packages/source/i/installer/installer-$portVersion.tar.gz"
15CHECKSUM_SHA256="a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"
16
17ARCHITECTURES="any"
18
19PROVIDES="
20	$portName = $portVersion
21	"
22REQUIRES="
23	haiku
24	"
25
26BUILD_REQUIRES="
27	haiku_devel
28	"
29
30PYTHON_PACKAGES=(python39 python310)
31PYTHON_VERSIONS=(3.9 3.10)
32for i in "${!PYTHON_PACKAGES[@]}"; do
33	pythonPackage=${PYTHON_PACKAGES[i]}
34	pythonVersion=${PYTHON_VERSIONS[$i]}
35
36	eval "PROVIDES_${pythonPackage}=\"
37		${portName}_$pythonPackage = $portVersion
38		\""
39	eval "REQUIRES_$pythonPackage=\"
40		haiku
41		cmd:python$pythonVersion
42		\""
43	BUILD_REQUIRES+="
44		build_$pythonPackage
45		flit_core_$pythonPackage
46		"
47	BUILD_PREREQUIRES+="
48		cmd:python$pythonVersion
49		"
50done
51
52INSTALL()
53{
54	for i in "${!PYTHON_PACKAGES[@]}"; do
55		python=python${PYTHON_VERSIONS[$i]}
56
57		$python -m build -wn --skip-dependency-check
58		PYTHONPATH=src $python -m installer --prefix=$prefix dist/*.whl
59
60		packageEntries ${PYTHON_PACKAGES[i]} \
61			$prefix/lib/python*
62	done
63}
64