1SUMMARY="Backported and experimental type hints for Python"
2DESCRIPTION="The typing_extensions module serves two related purposes:
3
4- Enable use of new type system features on older Python versions. For example,
5  typing.TypeGuard is new in Python 3.10, but typing_extensions allows
6  users on Python 3.6 through 3.9 to use it too.
7- Enable experimentation with new type system PEPs before they are accepted and
8  added to the typing module.
9
10New features may be added to typing_extensions as soon as they are specified in a PEP that has \
11been added to the python/peps repository. If the PEP is accepted, the feature will then be added \
12to typing for the next CPython release. No typing PEP has been rejected so far, so we haven't yet \
13figured out how to deal with that possibility.
14
15Starting with version 4.0.0, typing_extensions uses Semantic Versioning. The major version is \
16incremented for all backwards-incompatible changes. Therefore, it's safe to depend on \
17typing_extensions like this: typing_extensions >=x.y, <(x+1), where x.y is the first version that \
18includes all features you need.
19
20typing_extensions supports Python versions 3.7 and higher. In the future, support for older \
21Python versions will be dropped some time after that version reaches end of life."
22HOMEPAGE="https://github.com/python/typing_extensions"
23COPYRIGHT="2022 Guido van Rossum, Jukka Lehtosalo, ��ukasz Langa, Michael Lee"
24LICENSE="Python"
25REVISION="4"
26pypiVersion="ed/d6/2afc375a8d55b8be879d6b4986d4f69f01115e795e36827fd3a40166028b"
27SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/typing_extensions-$portVersion-py3-none-any.whl#noarchive"
28CHECKSUM_SHA256="25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"
29
30ARCHITECTURES="any"
31
32PROVIDES="
33	$portName = $portVersion
34	"
35REQUIRES="
36	haiku
37	"
38
39BUILD_REQUIRES="
40	haiku_devel
41	"
42
43PYTHON_PACKAGES=(python39 python310)
44PYTHON_VERSIONS=(3.9 3.10)
45for i in "${!PYTHON_PACKAGES[@]}"; do
46pythonPackage=${PYTHON_PACKAGES[i]}
47pythonVersion=${PYTHON_VERSIONS[$i]}
48eval "PROVIDES_${pythonPackage}=\"\
49	${portName}_$pythonPackage = $portVersion\
50	\"; \
51REQUIRES_$pythonPackage=\"\
52	haiku\n\
53	cmd:python$pythonVersion\n\
54	flit_core_$pythonPackage\
55	\""
56BUILD_REQUIRES="$BUILD_REQUIRES
57	setuptools_$pythonPackage"
58BUILD_PREREQUIRES="$BUILD_PREREQUIRES
59	installer_$pythonPackage
60	cmd:python$pythonVersion"
61done
62
63INSTALL()
64{
65	for i in "${!PYTHON_PACKAGES[@]}"; do
66		pythonPackage=${PYTHON_PACKAGES[i]}
67		pythonVersion=${PYTHON_VERSIONS[$i]}
68
69		python=python$pythonVersion
70		installLocation=$prefix/lib/$python/vendor-packages/
71		export PYTHONPATH=$installLocation:$PYTHONPATH
72		mkdir -p $installLocation
73		rm -rf build
74		$python -m installer -p $prefix typing_extensions-$portVersion-py3-none-any.whl
75
76		packageEntries  $pythonPackage \
77			$prefix/lib/python*
78	done
79}
80