From 66839753536568fc00fd74f18c51142468fb0ea7 Mon Sep 17 00:00:00 2001 From: iam-git <58433184+iam-git@users.noreply.github.com> Date: Thu, 26 Dec 2024 08:57:20 +0100 Subject: [PATCH] python: gast, new recipe (#11493) --- dev-python/gast/gast-0.6.0.recipe | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 dev-python/gast/gast-0.6.0.recipe diff --git a/dev-python/gast/gast-0.6.0.recipe b/dev-python/gast/gast-0.6.0.recipe new file mode 100644 index 000000000..285942d8d --- /dev/null +++ b/dev-python/gast/gast-0.6.0.recipe @@ -0,0 +1,61 @@ +SUMMARY="Python AST that abstracts the underlying Python version" +DESCRIPTION="A generic AST to represent Python2 and Python3’s Abstract Syntax Tree(AST).\ + +GAST provides a compatibility layer between the AST of various Python versions, \ +as produced by ast.parse from the standard ast module." +HOMEPAGE="https://github.com/serge-sans-paille/gast/ + https://pypi.org/project/gast/" +COPYRIGHT="2024 Serge Guelton" +LICENSE="BSD (3-clause)" +REVISION="2" +SOURCE_URI="https://files.pythonhosted.org/packages/py3/g/$portName/$portName-$portVersion-py3-none-any.whl#noarchive" +CHECKSUM_SHA256="52b182313f7330389f72b069ba00f174cfe2a06411099547288839c6cbafbd54" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_VERSIONS=(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 $portName-$portVersion-py3-none-any.whl + + packageEntries $pythonPackage \ + $prefix/lib/python* + done +}