From 031dbd2644475db9329ac613762120dae84b11f7 Mon Sep 17 00:00:00 2001 From: miqlas <5569059+extrowerk@users.noreply.github.com> Date: Sun, 2 Feb 2020 19:50:18 +0100 Subject: [PATCH] Soupsieve: new recipe (#4648) --- dev-python/soupsieve/soupsieve-1.9.5.recipe | 67 +++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 dev-python/soupsieve/soupsieve-1.9.5.recipe diff --git a/dev-python/soupsieve/soupsieve-1.9.5.recipe b/dev-python/soupsieve/soupsieve-1.9.5.recipe new file mode 100644 index 000000000..a9554a45a --- /dev/null +++ b/dev-python/soupsieve/soupsieve-1.9.5.recipe @@ -0,0 +1,67 @@ +SUMMARY="A modern CSS selector implementation for BeautifulSoup" +DESCRIPTION="Soup Sieve is a CSS selector library designed to be used with \ +Beautiful Soup 4. It aims to provide selecting, matching, and filtering \ +using modern CSS selectors. Soup Sieve currently provides selectors from \ +the CSS level 1 specifications up through the latest CSS level 4 drafts \ +and beyond (though some are not yet implemented)." +HOMEPAGE="https://github.com/facelessuser/soupsieve" +COPYRIGHT="2018 Isaac Muse" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/facelessuser/soupsieve/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="ba6a129e3e0e8ea5928684fd720f548eec65bc53947d9ac2b264dd2412d5cf55" +SOURCE_FILENAME="$portName-v$portVersion.tar.gz" + +ARCHITECTURES="!x86_gcc2 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + " + +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: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 +}