mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 01:30:07 +02:00
decorator-python, new recipe (#4751)
This commit is contained in:
64
dev-python/decorator/decorator-4.4.1.recipe
Normal file
64
dev-python/decorator/decorator-4.4.1.recipe
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user