blob: f9b7f9d20a67f1d0639560d4639403205effa218 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py-requests
_pkgname=requests
pkgver=2.21.0
pkgrel=4
pkgdesc="A HTTP request library for Python"
url="http://www.python-requests.org/"
arch="noarch"
license="Apache-2.0"
# Requirements for tests are not available in main
options="!check"
_py2_deps="py2-chardet py2-idna py2-certifi py2-urllib3"
_py3_deps="py3-chardet py3-idna py3-certifi py3-urllib3"
makedepends="
$_py2_deps $_py3_deps python2-dev python3-dev py2-setuptools py3-setuptools
"
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
support-urllib3-1.26.patch"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
package() {
mkdir -p "$pkgdir"
}
_py2() {
replaces="$pkgname"
depends="$_py2_deps"
_py python2
}
_py3() {
depends="$_py3_deps"
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc ${python#python}"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="385e1d80993a21c09e7c4682500ca8c24155962ba41ecd8e73612722b2ff6618b736e827fc48ad1683b0d2bc7a420cfe680f5107860aca52656ef777f1d60104 requests-2.21.0.tar.gz
7a52e88706e742f0973fec2f4784b6b51ed9adc8c82bccdb9bec3e7fe102f9794a512a53ccb08cb7460727357103c1dd8687c06bffd48aaf2f2811fd2e184a61 support-urllib3-1.26.patch"
|