1SUMMARY="A python package that provides useful locks"
2DESCRIPTION="Python cross platform locks for threads and processes."
3HOMEPAGE="https://github.com/harlowja/fasteners"
4LICENSE="Apache v2"
5COPYRIGHT="2014-2022 fasteners authors"
6REVISION="1"
7SOURCE_URI="https://pypi.python.org/packages/source/f/fasteners/fasteners-$portVersion.tar.gz"
8CHECKSUM_SHA256="cb7c13ef91e0c7e4fe4af38ecaf6b904ec3f5ce0dda06d34924b6b74b869d953"
9
10ARCHITECTURES="any"
11
12PROVIDES="
13	$portName = $portVersion
14	"
15REQUIRES="
16	haiku
17	"
18
19BUILD_REQUIRES="
20	haiku_devel
21	"
22
23PYTHON_PACKAGES=(python39 python310)
24PYTHON_VERSIONS=(3.9 3.10)
25for i in "${!PYTHON_PACKAGES[@]}"; do
26	pythonPackage=${PYTHON_PACKAGES[i]}
27	pythonVersion=${PYTHON_VERSIONS[$i]}
28
29	eval "PROVIDES_${pythonPackage}=\"
30		${portName}_$pythonPackage = $portVersion
31		\""
32	eval "REQUIRES_$pythonPackage=\"
33		haiku
34		cmd:python$pythonVersion
35		\""
36	BUILD_REQUIRES+="
37		build_$pythonPackage
38		installer_$pythonPackage
39		setuptools_$pythonPackage
40		wheel_$pythonPackage
41		"
42	BUILD_PREREQUIRES+="
43		cmd:python$pythonVersion
44		"
45done
46
47INSTALL()
48{
49	for i in "${!PYTHON_PACKAGES[@]}"; do
50		pythonVersion=${PYTHON_VERSIONS[$i]}
51
52		python=python$pythonVersion
53
54		$python -m build --wheel --skip-dependency-check --no-isolation
55		$python -m installer --p $prefix dist/*.whl
56
57		packageEntries ${PYTHON_PACKAGES[i]} \
58			"$prefix"/lib/python*
59	done
60}
61