diff --git a/dev-python/python_html2text/python_html2text-2016.1.8.recipe b/dev-python/python_html2text/python_html2text-2016.1.8.recipe new file mode 100644 index 000000000..6043c6d3f --- /dev/null +++ b/dev-python/python_html2text/python_html2text-2016.1.8.recipe @@ -0,0 +1,58 @@ +SUMMARY="Convert HTML to Markdown-formatted text" +DESCRIPTION=" + html2text is a Python script that converts a page of HTML into clean, + easy-to-read plain ASCII text. Better yet, that ASCII also happens to be + valid Markdown (a text-to-HTML format). +" +HOMEPAGE=" + https://github.com/html2text/html2text.py + https://github.com/Alir3z4/html2text + https://pypi.python.org/pypi/html2text + " +SOURCE_URI="https://pypi.python.org/packages/source/h/html2text/html2text-2016.1.8.tar.gz" +CHECKSUM_SHA256="088046f9b126761ff7e3380064d4792279766abaa5722d0dd765d011cf0bb079" +LICENSE="GNU GPL v3" +COPYRIGHT="2004-2008 Aaron Swartz" +REVISION="1" + +ARCHITECTURES="x86 x86_gcc2 x86_64" + +SOURCE_DIR="html2text-$portVersion" + +PROVIDES=" + python_html2text = $portVersion + " + +REQUIRES=" + haiku + cmd:python + #python_setuptools + " + +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 +}