mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
72 lines
2.1 KiB
Bash
72 lines
2.1 KiB
Bash
SUMMARY="Backported and experimental type hints for Python"
|
|
DESCRIPTION="The 'typing_extensions' module serves two related purposes:
|
|
|
|
- Enable use of new type system features on older Python versions. For example,
|
|
'typing.TypeGuard' is new in Python 3.10, but 'typing_extensions' allows
|
|
users on previous Python versions to use it too.
|
|
- Enable experimentation with new type system PEPs before they are accepted and
|
|
added to the 'typing' module.
|
|
|
|
'typing_extensions' is treated specially by static type checkers such as mypy and pyright.
|
|
Objects defined in typing_extensions are treated the same way as equivalent forms in 'typing'.
|
|
|
|
'typing_extensions' uses Semantic Versioning. The major version will be incremented only for
|
|
backwards-incompatible changes. Therefore, it's safe to depend on typing_extensions like this:
|
|
'typing_extensions >=x.y, <(x+1)', where 'x.y' is the first version that includes all features
|
|
you need."
|
|
HOMEPAGE="https://github.com/python/typing_extensions"
|
|
COPYRIGHT="2023 Guido van Rossum and others"
|
|
LICENSE="Python"
|
|
REVISION="1"
|
|
SOURCE_URI="https://files.pythonhosted.org/packages/py3/t/typing_extensions/typing_extensions-$portVersion-py3-none-any.whl#noarchive"
|
|
CHECKSUM_SHA256="04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.9 3.10)
|
|
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku
|
|
cmd:python$pythonVersion
|
|
\""
|
|
BUILD_REQUIRES+="
|
|
installer_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
|
|
$python -m installer -p $prefix typing_extensions-$portVersion-py3-none-any.whl
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|