From d5f1adf6c775ff82924b8233359cc7dbc15f6bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 27 Feb 2015 01:57:21 +0100 Subject: [PATCH] Add recipe for cssselector --- dev-python/cssselect/cssselect-0.9.1.recipe | 54 +++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 dev-python/cssselect/cssselect-0.9.1.recipe diff --git a/dev-python/cssselect/cssselect-0.9.1.recipe b/dev-python/cssselect/cssselect-0.9.1.recipe new file mode 100644 index 000000000..e881275c2 --- /dev/null +++ b/dev-python/cssselect/cssselect-0.9.1.recipe @@ -0,0 +1,54 @@ +SUMMARY="parses CSS3 Selectors and translates them to XPath 1.0" +DESCRIPTION=" + cssselect parses CSS3 Selectors and translate them to XPath 1.0 \ + expressions. Such expressions can be used in lxml or another XPath \ + engine to find the matching elements in an XML or HTML document. +" +HOMEPAGE=" + https://pythonhosted.org/cssselect/ + https://pypi.python.org/pypi/cssselect + " +SRC_URI="https://pypi.python.org/packages/source/c/cssselect/cssselect-0.9.1.tar.gz" +CHECKSUM_SHA256="0535a7e27014874b27ae3a4d33e8749e345bdfa62766195208b7996bf1100682" +LICENSE="BSD (3-clause)" +COPYRIGHT="2007-2012 Ian Bicking and contributors" +REVISION="1" + +ARCHITECTURES="x86 x86_gcc2 x86_64" + +PROVIDES=" + cssselect = $portVersion + " + +REQUIRES=" + haiku + cmd:python + " + +BUILD_REQUIRES=" + haiku_devel + python_setuptools + " + +BUILD_PREREQUIRES=" + cmd:python + " + +BUILD() +{ + $portPackageLinksDir/cmd~python/bin/python setup.py build +} + +INSTALL() +{ + # GENERIC: all python_setuptools-based installs need this + export PATH="$portPackageLinksDir/cmd~python/bin:$PATH" + pythonVersion=$(python --version 2>&1 | sed 's/Python //' | head -c3) + installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + + python setup.py install \ + --single-version-externally-managed \ + --root=/ --prefix=$prefix +}