mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
html2text: bump version.
keep 2019.8.11 for python 2.7.
This commit is contained in:
72
dev-python/html2text/html2text-2019.9.26.recipe
Normal file
72
dev-python/html2text/html2text-2019.9.26.recipe
Normal file
@@ -0,0 +1,72 @@
|
||||
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"
|
||||
COPYRIGHT="2004-2008 Aaron Swartz"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/Alir3z4/html2text/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="22a85d1634cfb198f569980b3095d560021860e19c809a5e9643129595ce8bd4"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python36 python3)
|
||||
PYTHON_VERSIONS=(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
|
||||
|
||||
PROVIDES_python36="$PROVIDES_python36
|
||||
cmd:html2text3.6
|
||||
"
|
||||
PROVIDES_python3="$PROVIDES_python3
|
||||
cmd:html2text3.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/html2text $binDir/html2text$pythonVersion
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$binDir
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user