From bfb5bd56085ede8d0a6a24ceb90abe59cac8a3bb Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Thu, 15 Sep 2022 09:12:33 +0200 Subject: [PATCH] automat, new python recipe (#7204) --- dev-python/automat/automat-20.2.0~git.recipe | 75 ++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 dev-python/automat/automat-20.2.0~git.recipe diff --git a/dev-python/automat/automat-20.2.0~git.recipe b/dev-python/automat/automat-20.2.0~git.recipe new file mode 100644 index 000000000..27abed988 --- /dev/null +++ b/dev-python/automat/automat-20.2.0~git.recipe @@ -0,0 +1,75 @@ +SUMMARY="Self-service finite-state machines for the programmer on the go" +DESCRIPTION="Automat is a library for concise, idiomatic Python expression of finite-state +automata (particularly deterministic finite-state transducers)" +HOMEPAGE="https://github.com/glyph/automat" +COPYRIGHT="2014 Rackspace" +LICENSE="MIT" +REVISION="1" +srcGitRev="4260ebbc3347b12566f219fe0e887c18bf972cb9" +SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz" +CHECKSUM_SHA256="580c8d9eaeb7c6eb29c6d34a2b169474b461ebec158da2e266d5edf621db1dbd" +SOURCE_FILENAME="automat-v$portVersion-$srcGitRev.tar.gz" +SOURCE_DIR="automat-$srcGitRev" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python3 python38 python39 python310) +PYTHON_VERSIONS=(3.7 3.8 3.9 3.10) +for i in "${!PYTHON_PACKAGES[@]}"; do +pythonPackage=${PYTHON_PACKAGES[i]} +pythonVersion=${PYTHON_VERSIONS[$i]} +eval "PROVIDES_${pythonPackage}=\"\ + ${portName}_$pythonPackage = $portVersion\n\ + cmd:automat_visualize$pythonVersion\n\ + \"; \ +REQUIRES_$pythonPackage=\"\ + haiku\n\ + cmd:python$pythonVersion\n\ + python_graphviz_$pythonPackage\n\ + \"" +BUILD_REQUIRES="$BUILD_REQUIRES + setuptools_$pythonPackage + setuptools_scm_$pythonPackage + wheel_$pythonPackage + cmd:git" +BUILD_PREREQUIRES="$BUILD_PREREQUIRES + 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 setup.py build install \ + --root=/ --prefix="$prefix" + + mv "$prefix"/bin/automat-visualize \ + "$prefix"/bin/automat-visualize$pythonVersion + + install -m 755 -d "$docDir" + install -m 644 -t "$docDir" README.md + + packageEntries $pythonPackage \ + "$prefix"/lib/$python \ + "$prefix"/bin \ + "$docDir" + done +}