mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
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:
72
dev-python/urllib3/urllib3-1.20.recipe
Normal file
72
dev-python/urllib3/urllib3-1.20.recipe
Normal file
@@ -0,0 +1,72 @@
|
||||
SUMMARY="HTTP library with thread-safe connection pooling, file post, and more"
|
||||
DESCRIPTION="- Re-use the same socket connection for multiple requests \
|
||||
(HTTPConnectionPool and HTTPSConnectionPool) with optional client-side \
|
||||
certificate verification.
|
||||
- File posting (encode_multipart_formdata).
|
||||
- Built-in redirection and retries (optional).
|
||||
- Supports gzip and deflate decoding.
|
||||
- Thread-safe and sanity-safe.
|
||||
- Works with AppEngine, gevent, and eventlib.
|
||||
- Tested on Python 2.6+, Python 3.2+, and PyPy, with 100% unit test coverage.
|
||||
- Small and easy to understand codebase perfect for extending and building \
|
||||
upon.
|
||||
|
||||
For a more comprehensive solution, have a look at \
|
||||
Requests <http://python-requests.org/> which is also powered by urllib3"
|
||||
HOMEPAGE="http://urllib3.readthedocs.org/
|
||||
https://pypi.python.org/pypi/urllib3"
|
||||
COPYRIGHT="2008-2014 Andrey Petrov and contributors"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/shazow/urllib3/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="8232fd4c28f7463aaa20894a3fc9bbacb4992b9f6d90705a1a396690e93fc0a6"
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user