Repository navigation
Expand file tree
/
Copy pathpython2-ndg-httpsclient.avhb
More file actions
50 lines (42 loc) · 1.79 KB
/
Copy pathpython2-ndg-httpsclient.avhb
File metadata and controls
50 lines (42 loc) · 1.79 KB
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
# $Id$
# Maintainer: Qurban Ullah <[email protected]>
# Contributor: Qurban Ullah <[email protected]>
pkgbase=python-ndg-httpsclient
pkgname=(python-ndg-httpsclient python2-ndg-httpsclient)
_pkgname=ndg_httpsclient
_realname=ndg_httpsclient
pkgver=0.4.2
pkgrel=1
pkgdesc="Provides enhanced HTTPS support for httplib and urllib2 using PyOpenSSL"
arch=(any)
url="https://pypi.python.org/pypi/ndg-httpsclient"
license=('BSD')
makedepends=(python2-setuptools python2-pyopenssl python2-pyasn1
python-setuptools python-pyopenssl python-pyasn1)
options=(!emptydirs)
source=(https://files.pythonhosted.org/packages/source/n/ndg-httpsclient/$_pkgname-$pkgver.tar.gz)
sha256sums=('580987ef194334c50389e0d7de885fccf15605c13c6eecaabd8d6c43768eb8ac')
build() {
cd "$srcdir"/$_pkgname-$pkgver
rm -rf ../buildpy3; mkdir ../buildpy3
python setup.py build -b ../buildpy3
rm -rf ../buildpy2; mkdir ../buildpy2
python2 setup.py build -b ../buildpy2
}
package_python-ndg-httpsclient() {
depends=(python-pyopenssl python-pyasn1)
_site_packages=$(python -sSc 'import site; print(site.getsitepackages()[0])')
cd "$srcdir"/$_pkgname-$pkgver
rm -rf build; ln -s ../buildpy3 build
python setup.py install --skip-build -O1 --root="$pkgdir"
install -Dm0644 "$pkgdir$_site_packages"/ndg/httpsclient/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python2-ndg-httpsclient() {
depends=(python2-pyopenssl python2-pyasn1)
_site_packages=$(python2 -sSc 'import site; print(site.getsitepackages()[0])')
cd "$srcdir"/$_pkgname-$pkgver
rm -rf build; ln -s ../buildpy2 build
python2 setup.py install --skip-build -O1 --root="$pkgdir"
install -Dm0644 "$pkgdir$_site_packages"/ndg/httpsclient/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
mv "$pkgdir"/usr/bin/ndg_httpclient{,2}
}