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,81 @@
SUMMARY="Stateful programmatic web browsing in Python"
DESCRIPTION="Stateful programmatic web browsing in Python, after Andy \
Lesters Perl module WWW::Mechanize.
- mechanize.Browser and mechanize.UserAgentBase implement \
the interface of urllib2.OpenerDirector, so any URL can be opened, not \
just http.
- mechanize.UserAgentBase offers easy dynamic configuration \
of user-agent features like protocol, cookie, redirection and \
robots.txt handling, without having to make a new OpenerDirector \
each time, e.g. by calling build_opener().
- Easy HTML form filling.
- Convenient link parsing and following.
- Browser history (.back() and .reload() methods).
- The Referer HTTP header is added properly (optional).
- Automatic observance of robots.txt.
- Automatic handling of HTTP-Equiv and Refresh."
HOMEPAGE="https://github.com/python-mechanize/mechanize
http://pypi.python.org/pypi/mechanize"
COPYRIGHT="2002-2010 John J. Lee
1997-1999 Gisle Aas
1997-1999 Johnny Lee
2003 Andy Lester"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/python-mechanize/mechanize/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="0f14880646fc96da91440712546fd136896b151228366cdc0604534e0687036c"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python)
PYTHON_VERSIONS=(2.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
REPLACES_python="
python_mechanize
"
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
}

View File

@@ -1,69 +0,0 @@
SUMMARY="Stateful programmatic web browsing in Python"
DESCRIPTION="Stateful programmatic web browsing in Python, after Andy \
Lesters Perl module WWW::Mechanize.
- mechanize.Browser and mechanize.UserAgentBase implement \
the interface of urllib2.OpenerDirector, so any URL can be opened, not \
just http.
- mechanize.UserAgentBase offers easy dynamic configuration \
of user-agent features like protocol, cookie, redirection and \
robots.txt handling, without having to make a new OpenerDirector \
each time, e.g. by calling build_opener().
- Easy HTML form filling.
- Convenient link parsing and following.
- Browser history (.back() and .reload() methods).
- The Referer HTTP header is added properly (optional).
- Automatic observance of robots.txt.
- Automatic handling of HTTP-Equiv and Refresh."
HOMEPAGE="http://wwwsearch.sourceforge.net/mechanize/
http://pypi.python.org/pypi/mechanize"
COPYRIGHT="2002-2010 John J. Lee
1997-1999 Gisle Aas
1997-1999 Johnny Lee
2003 Andy Lester"
#gentoo says: LICENSE="|| ( BSD ZPL )"
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz"
CHECKSUM_SHA256="2e67b20d107b30c00ad814891a095048c35d9d8cb9541801cebe85684cc84766"
SOURCE_DIR="mechanize-$portVersion"
ARCHITECTURES="x86 x86_gcc2 x86_64"
PROVIDES="
python_mechanize = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:python
python_setuptools
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
python_setuptools
"
BUILD_PREREQUIRES="
cmd:python
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
"
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
}