From d19c8395541712da64f4596d46b29a58a86c64e9 Mon Sep 17 00:00:00 2001 From: OscarL Date: Fri, 22 Mar 2024 04:07:38 -0300 Subject: [PATCH] expandvars: new recipe. (#10237) Required to build newest version of "yarl" (1.9.4). --- .../expandvars/expandvars-0.12.0.recipe | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 dev-python/expandvars/expandvars-0.12.0.recipe diff --git a/dev-python/expandvars/expandvars-0.12.0.recipe b/dev-python/expandvars/expandvars-0.12.0.recipe new file mode 100644 index 000000000..49e16f7bb --- /dev/null +++ b/dev-python/expandvars/expandvars-0.12.0.recipe @@ -0,0 +1,64 @@ +SUMMARY="Expand system variables, Unix style" +DESCRIPTION="This module is inspired by GNU bash's variable expansion features. \ +It can be used as an alternative to Python's os.path.expandvars function. + +A good use case is reading config files with the flexibility of reading values from \ +environment variables using advanced features like returning a default value if some \ +variable is not defined." +HOMEPAGE="https://github.com/sayanarijit/expandvars" +COPYRIGHT="2019 Arijit Basu" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://files.pythonhosted.org/packages/py3/${portName:0:1}/$portName/$portName-$portVersion-py3-none-any.whl#noarchive" +CHECKSUM_SHA256="7432c1c2ae50c671a8146583177d60020dd210ada7d940e52af91f1f84f753b2" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +# Add more versions here as necessary: +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=\" + $REQUIRES + 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 +}