From 9714938837f338c5d6bc361f09ed7b6090028293 Mon Sep 17 00:00:00 2001 From: extrowerk <5569059+extrowerk@users.noreply.github.com> Date: Tue, 14 Apr 2020 21:44:56 +0200 Subject: [PATCH] jsonschema: new recipe (#4856) --- dev-python/jsonschema/jsonschema-3.2.0.recipe | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 dev-python/jsonschema/jsonschema-3.2.0.recipe diff --git a/dev-python/jsonschema/jsonschema-3.2.0.recipe b/dev-python/jsonschema/jsonschema-3.2.0.recipe new file mode 100644 index 000000000..360addf00 --- /dev/null +++ b/dev-python/jsonschema/jsonschema-3.2.0.recipe @@ -0,0 +1,65 @@ +SUMMARY="Helps pull configuration into a project" +DESCRIPTION="Makes configuration easy! Application settings come from a \ +config file into your code cleanly." +HOMEPAGE="https://pypi.org/project/jsonschema/ + https://github.com/Julian/jsonschema" +COPYRIGHT="2013 Julian Berman" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://files.pythonhosted.org/packages/69/11/a69e2a3c01b324a77d3a7c0570faa372e8448b666300c4117a516f8b1212/jsonschema-3.2.0.tar.gz" +CHECKSUM_SHA256="c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python3) +PYTHON_VERSIONS=(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:python$pythonVersion" +done + +PROVIDES_python3="$PROVIDES_python3 + cmd:jsonschema3.7 + " + +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 $binDir/jsonschema $binDir/jsonschema$pythonVersion + packageEntries $pythonPackage \ + $prefix/lib/python* \ + $binDir + done +}