diff --git a/dev-python/typing-extensions/typing_extensions-4.12.2.recipe b/dev-python/typing-extensions/typing_extensions-4.12.2.recipe new file mode 100644 index 000000000..6fa2d117c --- /dev/null +++ b/dev-python/typing-extensions/typing_extensions-4.12.2.recipe @@ -0,0 +1,71 @@ +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 +} diff --git a/dev-python/typing-extensions/typing_extensions-4.3.0.recipe b/dev-python/typing-extensions/typing_extensions-4.3.0.recipe deleted file mode 100644 index f98a25251..000000000 --- a/dev-python/typing-extensions/typing_extensions-4.3.0.recipe +++ /dev/null @@ -1,79 +0,0 @@ -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 Python 3.6 through 3.9 to use it too. -- Enable experimentation with new type system PEPs before they are accepted and - added to the typing module. - -New features may be added to typing_extensions as soon as they are specified in a PEP that has \ -been added to the python/peps repository. If the PEP is accepted, the feature will then be added \ -to typing for the next CPython release. No typing PEP has been rejected so far, so we haven't yet \ -figured out how to deal with that possibility. - -Starting with version 4.0.0, typing_extensions uses Semantic Versioning. The major version is \ -incremented for all 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. - -typing_extensions supports Python versions 3.7 and higher. In the future, support for older \ -Python versions will be dropped some time after that version reaches end of life." -HOMEPAGE="https://github.com/python/typing_extensions" -COPYRIGHT="2022 Guido van Rossum, Jukka Lehtosalo, Ɓukasz Langa, Michael Lee" -LICENSE="Python" -REVISION="4" -pypiVersion="ed/d6/2afc375a8d55b8be879d6b4986d4f69f01115e795e36827fd3a40166028b" -SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/typing_extensions-$portVersion-py3-none-any.whl#noarchive" -CHECKSUM_SHA256="25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02" - -ARCHITECTURES="any" - -PROVIDES=" - $portName = $portVersion - " -REQUIRES=" - haiku - " - -BUILD_REQUIRES=" - haiku_devel - " - -PYTHON_PACKAGES=(python39 python310) -PYTHON_VERSIONS=(3.9 3.10) -for i in "${!PYTHON_PACKAGES[@]}"; do -pythonPackage=${PYTHON_PACKAGES[i]} -pythonVersion=${PYTHON_VERSIONS[$i]} -eval "PROVIDES_${pythonPackage}=\"\ - ${portName}_$pythonPackage = $portVersion\ - \"; \ -REQUIRES_$pythonPackage=\"\ - haiku\n\ - cmd:python$pythonVersion\n\ - flit_core_$pythonPackage\ - \"" -BUILD_REQUIRES="$BUILD_REQUIRES - setuptools_$pythonPackage" -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - installer_$pythonPackage - cmd:python$pythonVersion" -done - -INSTALL() -{ - for i in "${!PYTHON_PACKAGES[@]}"; do - pythonPackage=${PYTHON_PACKAGES[i]} - pythonVersion=${PYTHON_VERSIONS[$i]} - - python=python$pythonVersion - installLocation=$prefix/lib/$python/vendor-packages/ - export PYTHONPATH=$installLocation:$PYTHONPATH - mkdir -p $installLocation - rm -rf build - $python -m installer -p $prefix typing_extensions-$portVersion-py3-none-any.whl - - packageEntries $pythonPackage \ - $prefix/lib/python* - done -}