Files
haikuports/dev-python/gast/gast-0.6.0.recipe
2024-12-26 08:57:20 +01:00

62 lines
1.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
SUMMARY="Python AST that abstracts the underlying Python version"
DESCRIPTION="A generic AST to represent Python2 and Python3s 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
}