From 077d73aa7c2e0b782eb4bc090b36de3119b4b7c9 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Tue, 25 Feb 2020 18:42:56 +0100 Subject: [PATCH] decorator-python, new recipe (#4751) --- dev-python/decorator/decorator-4.4.1.recipe | 64 +++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 dev-python/decorator/decorator-4.4.1.recipe diff --git a/dev-python/decorator/decorator-4.4.1.recipe b/dev-python/decorator/decorator-4.4.1.recipe new file mode 100644 index 000000000..c03fcf579 --- /dev/null +++ b/dev-python/decorator/decorator-4.4.1.recipe @@ -0,0 +1,64 @@ +SUMMARY="Simplifies the usage of decorators for the average programmer" +DESCRIPTION="The goal of the decorator module is to make it easy to define \ +signature-preserving function decorators and decorator factories. +It also includes an implementation of multiple dispatch and other niceties \ +(please check the docs). +It is released under a two-clauses BSD license, i.e. basically you can do \ +whatever you want with it but I am not responsible." +HOMEPAGE="https://github.com/micheles/decorator" +COPYRIGHT="2003-2019 Michele Simionato" +LICENSE="BSD (2-clause)" +REVISION="1" +SOURCE_URI="https://files.pythonhosted.org/packages/dc/c3/9d378af09f5737cfd524b844cd2fbb0d2263a35c11d712043daab290144d/decorator-$portVersion.tar.gz" +CHECKSUM_SHA256="54c38050039232e1db4ad7375cfce6748d7b41c29e95a081c8a6d2c30364a2ce" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python python36 python3) +PYTHON_VERSIONS=(2.7 3.6 3.7) +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\ + \"" +BUILD_REQUIRES="$BUILD_REQUIRES + setuptools_$pythonPackage" +BUILD_PREREQUIRES="$BUILD_PREREQUIRES + cmd:git + 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 + + packageEntries $pythonPackage \ + $prefix/lib/python* + done +}