desktop/python-requests/PKGBUILD

48 lines
1.2 KiB
Bash

# Maintainer: Daniele Cocca <jmc@chakra-project.org>
pkgbase=requests
pkgname=("python2-${pkgbase}" "python3-${pkgbase}")
pkgver=1.1.0
pkgrel=3
pkgdesc="Requests is an Apache2 Licensed HTTP library, written in Python, for human beings."
arch=('any')
url="http://python-requests.org/"
license=('APACHE')
makedepends=('python2' 'python3')
source=("https://pypi.python.org/packages/source/r/requests/${pkgbase}-${pkgver}.tar.gz")
md5sums=('a0158815af244c32041a3147ee09abf3')
build() {
msg2 "Starting the Python 2.x build"
cd "${srcdir}"
rm -rf "python2-${pkgbase}"
cp -r "${pkgbase}-${pkgver}" "python2-${pkgbase}"
cd "python2-${pkgbase}"
python2 setup.py build
msg2 "Starting the Python 3.x build"
cd "${srcdir}"
rm -rf "python3-${pkgbase}"
cp -r "${pkgbase}-${pkgver}" "python3-${pkgbase}"
cd "python3-${pkgbase}"
python3 setup.py build
}
package_python2-requests() {
depends=('python2')
cd "${srcdir}/python2-${pkgbase}"
python2 setup.py install --prefix=/usr --root="${pkgdir}"
}
package_python3-requests() {
depends=('python3')
cd "${srcdir}/python3-${pkgbase}"
python3 setup.py install --prefix=/usr --root="${pkgdir}"
}
# vim:set ts=2 sw=2 et: