2013-08-25 06:11:05 +00:00
|
|
|
# Template file for 'python-requests'
|
|
|
|
pkgname=python-requests
|
2015-02-28 18:55:55 +00:00
|
|
|
version=2.5.3
|
2014-12-17 09:21:51 +00:00
|
|
|
revision=1
|
2014-07-07 08:30:00 +00:00
|
|
|
noarch=yes
|
|
|
|
wrksrc="requests-${version}"
|
2014-02-22 22:55:53 +00:00
|
|
|
build_style="python-module"
|
2014-07-07 08:30:00 +00:00
|
|
|
python_versions="2.7 3.4"
|
2014-10-29 22:50:31 +00:00
|
|
|
hostmakedepends="
|
|
|
|
python-setuptools python3.4-setuptools python-chardet python3.4-chardet
|
|
|
|
python-urllib3 python3.4-urllib3"
|
|
|
|
makedepends="${hostmakedepends}"
|
2014-10-29 15:17:00 +00:00
|
|
|
depends="python-chardet python-urllib3 ca-certificates"
|
2014-01-01 15:10:11 +00:00
|
|
|
pycompile_module="requests"
|
2014-07-07 08:30:00 +00:00
|
|
|
short_desc="Python HTTP for Humans (Python2)"
|
2014-10-29 15:17:00 +00:00
|
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
2013-08-25 06:11:05 +00:00
|
|
|
homepage="http://docs.python-requests.org/en/latest/"
|
|
|
|
license="Apache-2.0"
|
2014-10-29 15:17:00 +00:00
|
|
|
distfiles="${PYPI_SITE}/r/requests/requests-${version}.tar.gz"
|
2015-02-28 18:55:55 +00:00
|
|
|
checksum=55d7f5619daae94ec49ee81ed8c865e5a2a47f0bbf8e06cf94636bee103eaf65
|
2014-02-22 22:55:53 +00:00
|
|
|
|
2014-07-07 08:30:00 +00:00
|
|
|
pre_build() {
|
2015-02-28 18:55:55 +00:00
|
|
|
# remove bundled cacerts
|
|
|
|
rm -f requests/cacert.pem
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
# replace bundled copy of chardet and urllib3
|
|
|
|
for pyver in $python_versions; do
|
|
|
|
rm -rf ${DESTDIR}/usr/lib/python${pyver}/site-packages/requests/packages/{chardet,urllib3}
|
|
|
|
ln -sf ../../chardet ${DESTDIR}/usr/lib/python${pyver}/site-packages/requests/packages/chardet
|
|
|
|
ln -sf ../../urllib3 ${DESTDIR}/usr/lib/python${pyver}/site-packages/requests/packages/urllib3
|
|
|
|
done
|
2014-07-07 08:30:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-requests_package() {
|
|
|
|
noarch=yes
|
2014-10-29 15:17:00 +00:00
|
|
|
depends="python3.4-chardet python3.4-urllib3 ca-certificates"
|
2014-07-07 08:30:00 +00:00
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="requests"
|
|
|
|
short_desc="${short_desc/Python2/Python3.4}"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python3.4
|
|
|
|
}
|
|
|
|
}
|