1SUMMARY="Low-level replacement for pep517"
2DESCRIPTION="This is a low-level library for calling build-backends in 'pyproject.toml'-based \
3project. It provides the basic functionality to help write tooling that generates distribution files \
4from Python projects.
5
6If you want a tool that builds Python packages, you���ll want to use https://github.com/pypa/build \
7instead. This is an underlying piece for pip, build and other ���build frontends��� use to call \
8���build backends��� within them.
9
10Note: The 'pep517' project has been replaced by this project (low level) and the 'build' project \
11(high level)."
12HOMEPAGE="https://pypi.org/project/pyproject_hooks/"
13COPYRIGHT="2017 Thomas Kluyver"
14LICENSE="MIT"
15REVISION="2"
16SOURCE_URI="https://github.com/pypa/pyproject-hooks/archive/refs/tags/v$portVersion.tar.gz"
17CHECKSUM_SHA256="d45c52f9af6bce94755eecf9dbfe6b3c89ef9a50088a8809f5bbec4ed0f9be0b"
18SOURCE_DIR="pyproject-hooks-$portVersion"
19
20ARCHITECTURES="any"
21
22PROVIDES="
23	$portName = $portVersion
24	"
25REQUIRES="
26	haiku
27	"
28
29BUILD_REQUIRES="
30	haiku_devel
31	"
32
33PYTHON_PACKAGES=(python39 python310)
34PYTHON_VERSIONS=(3.9 3.10)
35for i in "${!PYTHON_PACKAGES[@]}"; do
36	pythonPackage=${PYTHON_PACKAGES[i]}
37	pythonVersion=${PYTHON_VERSIONS[$i]}
38
39	eval "PROVIDES_${pythonPackage}=\"
40		${portName}_$pythonPackage = $portVersion
41		\""
42
43	eval "REQUIRES_$pythonPackage=\"
44		haiku
45		tomli_$pythonPackage # only for python < 3.11.
46		cmd:python$pythonVersion
47		\""
48	BUILD_REQUIRES+="
49		flit_core_$pythonPackage
50		installer_$pythonPackage
51		"
52	BUILD_PREREQUIRES+="
53		cmd:python$pythonVersion
54		"
55done
56
57
58INSTALL()
59{
60	for i in "${!PYTHON_PACKAGES[@]}"; do
61		pythonPackage=${PYTHON_PACKAGES[i]}
62		pythonVersion=${PYTHON_VERSIONS[$i]}
63
64		python=python$pythonVersion
65		installLocation=$prefix/lib/$python/vendor-packages/
66		export PYTHONPATH=$installLocation:$PYTHONPATH
67
68		mkdir -p $installLocation
69		rm -rf dist
70
71		$python -m flit_core.wheel
72		$python -m installer -p $prefix dist/*.whl
73
74		packageEntries  $pythonPackage \
75			$prefix/lib/python*
76	done
77}
78