void-packages/srcpkgs/python-requests/template
2017-01-25 23:53:45 +01:00

45 lines
1.6 KiB
Bash

# Template file for 'python-requests'
pkgname=python-requests
version=2.13.0
revision=1
noarch=yes
wrksrc="requests-${version}"
build_style=python-module
pycompile_module="requests"
hostmakedepends="python-setuptools python3-setuptools"
depends="ca-certificates python-chardet python-urllib3 python-idna"
short_desc="Python2 HTTP library for human beings"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="http://python-requests.org/"
license="Apache-2.0"
distfiles="${PYPI_SITE}/r/requests/requests-${version}.tar.gz"
checksum=5722cd09762faa01276230270ff16af7acf7c5c45d623868d9ba116f15791ce8
post_install() {
# replace bundled copy of cacert, chardet, urllib3, and idna
for py_sitelib in $py2_sitelib $py3_sitelib; do
rm -rf ${DESTDIR}/${py_sitelib}/requests/cacert.pem
rm -rf ${DESTDIR}/${py_sitelib}/requests/packages/{chardet,urllib3,idna}
ln -sf ../../chardet ${DESTDIR}/${py_sitelib}/requests/packages/chardet
ln -sf ../../urllib3 ${DESTDIR}/${py_sitelib}/requests/packages/urllib3
ln -sf ../../idna ${DESTDIR}/${py_sitelib}/requests/packages/idna
ln -sf /etc/ssl/cert.pem ${DESTDIR}/${py_sitelib}/requests/cacert.pem
done
}
python3-requests_package() {
noarch=yes
pycompile_module="requests"
replaces="python3.4-requests>=0"
depends="ca-certificates python3-chardet python3-urllib3 python3-idna"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
}
}
python3.4-requests_package() {
noarch=yes
build_style=meta
short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
depends="python3-requests>=${version}_${revision}"
}