dev-python: merge most python2 and python3 recipes.

* adjust recipes depending on these, ie python_dateutil=>dateutil_python.
* switch architectures to any for relevant python recipes.
* bump versions for retext, argh, beautifulsoup, cssselect, dateutil,
docutils, fonttools, html2text, httplib2, lxml, mechanize, mock, paramiko,
pillow, pip, pygments, requests, twisted, urllib3, zope_interface.
This commit is contained in:
Jerome Duval
2017-04-16 23:10:32 +02:00
parent 5ce1bcd42d
commit 282a03c8e8
89 changed files with 2389 additions and 1913 deletions

View File

@@ -0,0 +1,77 @@
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="21c0237fae4f640eef53343a2965f44bfd907f0e1b956cd1171fb3884541767a"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python python3)
PYTHON_VERSIONS=(2.7 3.6)
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_python="$PROVIDES_python
cmd:html2text
"
REPLACES_python="
python_html2text
"
PROVIDES_python3="$PROVIDES_python3
cmd:html2text3
"
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
if [ $pythonPackage != python ]; then
mv $binDir/html2text $binDir/html2text3
fi
packageEntries $pythonPackage \
$prefix/lib/python* \
$binDir
done
}

View File

@@ -1,52 +0,0 @@
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://pypi.python.org/packages/source/h/html2text/html2text-$portVersion.tar.gz"
CHECKSUM_SHA256="32e5e49eb520335bae200a00e3cc981f1ade558930068e1bb2a6e3fb1504f951"
SOURCE_DIR="html2text-$portVersion"
ARCHITECTURES="x86 x86_gcc2 x86_64"
PROVIDES="
python_html2text = $portVersion
"
REQUIRES="
haiku
cmd:python2
#python_setuptools
"
BUILD_REQUIRES="
haiku_devel
python_setuptools
"
BUILD_PREREQUIRES="
cmd:python2
"
BUILD()
{
$portPackageLinksDir/cmd~python2/bin/python2 setup.py build
}
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
export PATH="$portPackageLinksDir/cmd~python2/bin:$PATH"
pythonVersion=$(python2 --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
python2 setup.py install \
--single-version-externally-managed \
--root=/ --prefix=$prefix
}