1SUMMARY="Makes Python extensions easier to write"
2DESCRIPTION="A small C++ header library which makes it easier to write Python extension modules.\
3 The primary feature is a PyObject smart pointer which automatically handles reference counting \
4 and provides convenience methods for performing common object operations."
5HOMEPAGE="https://github.com/nucleic/cppy/"
6COPYRIGHT="2014-2022, Nucleic Development Team"
7LICENSE="BSD (3-clause)"
8REVISION="2"
9pypiVersion="31/5e/b8faf2b2aeb679c0f4359fd1a4716fe90d65f72f72639413ffb95f3c3b46"
10SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/$portName-$portVersion-py3-none-any.whl#noarchive"
11CHECKSUM_SHA256='c5b5eac3d3f42593a07d35275b0bc27f447b76b9ad8f27c62e3cfa286dc1988a'
12
13ARCHITECTURES="any"
14
15PROVIDES="
16	$portName = $portVersion
17	"
18REQUIRES="
19	haiku
20	"
21
22BUILD_REQUIRES="
23	haiku_devel
24	"
25
26PYTHON_PACKAGES=(python39 python310)
27PYTHON_VERSIONS=(3.9 3.10)
28for i in "${!PYTHON_PACKAGES[@]}"; do
29pythonPackage=${PYTHON_PACKAGES[i]}
30pythonVersion=${PYTHON_VERSIONS[$i]}
31eval "PROVIDES_${pythonPackage}=\"\
32	${portName}_$pythonPackage = $portVersion\
33	\"; \
34REQUIRES_$pythonPackage=\"\
35	haiku\n\
36	cmd:python$pythonVersion\
37	\""
38BUILD_PREREQUIRES="$BUILD_PREREQUIRES
39	installer_$pythonPackage
40	cmd:python$pythonVersion"
41done
42
43INSTALL()
44{
45	for i in "${!PYTHON_PACKAGES[@]}"; do
46		pythonPackage=${PYTHON_PACKAGES[i]}
47		pythonVersion=${PYTHON_VERSIONS[$i]}
48
49		python=python$pythonVersion
50		installLocation=$prefix/lib/$python/vendor-packages/
51		export PYTHONPATH=$installLocation:$PYTHONPATH
52		mkdir -p $installLocation
53		rm -rf build
54		$python -m installer -p $prefix $portName-$portVersion-py3-none-any.whl
55
56		packageEntries  $pythonPackage \
57			$prefix/lib/python*
58	done
59}
60