1SUMMARY="Expand system variables, Unix style"
2DESCRIPTION="This module is inspired by GNU bash's variable expansion features. \
3It can be used as an alternative to Python's os.path.expandvars function.
4
5A good use case is reading config files with the flexibility of reading values from \
6environment variables using advanced features like returning a default value if some \
7variable is not defined."
8HOMEPAGE="https://github.com/sayanarijit/expandvars"
9COPYRIGHT="2019 Arijit Basu"
10LICENSE="MIT"
11REVISION="1"
12SOURCE_URI="https://files.pythonhosted.org/packages/py3/${portName:0:1}/$portName/$portName-$portVersion-py3-none-any.whl#noarchive"
13CHECKSUM_SHA256="7432c1c2ae50c671a8146583177d60020dd210ada7d940e52af91f1f84f753b2"
14
15ARCHITECTURES="any"
16
17PROVIDES="
18	$portName = $portVersion
19	"
20REQUIRES="
21	haiku
22	"
23
24BUILD_REQUIRES="
25	haiku_devel
26	"
27
28# Add more versions here as necessary:
29PYTHON_VERSIONS=(3.10)
30
31for i in "${!PYTHON_VERSIONS[@]}"; do
32	pythonVersion=${PYTHON_VERSIONS[$i]}
33	pythonPackage=python${pythonVersion//.}
34
35	eval "PROVIDES_$pythonPackage=\"
36		${portName}_$pythonPackage = $portVersion
37		\""
38
39	eval "REQUIRES_$pythonPackage=\"
40		$REQUIRES
41		cmd:python$pythonVersion
42		\""
43
44	BUILD_REQUIRES+="
45		installer_$pythonPackage
46		"
47	BUILD_PREREQUIRES+="
48		cmd:python$pythonVersion
49		"
50done
51
52INSTALL()
53{
54	for i in "${!PYTHON_VERSIONS[@]}"; do
55		pythonVersion=${PYTHON_VERSIONS[$i]}
56		pythonPackage=python${pythonVersion//.}
57
58		python=python$pythonVersion
59		$python -m installer -p $prefix $portName-$portVersion-py3-none-any.whl
60
61		packageEntries $pythonPackage \
62			$prefix/lib/python*
63	done
64}
65