mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
46 lines
1.7 KiB
Bash
46 lines
1.7 KiB
Bash
pkgbase=python-ndg-httpsclient
|
|
pkgname=(python3-ndg-httpsclient python2-ndg-httpsclient)
|
|
_pkgname=ndg_httpsclient
|
|
pkgver=0.4.3
|
|
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
|
|
python3-setuptools python3-pyopenssl python3-pyasn1)
|
|
options=(!emptydirs)
|
|
source=(https://files.pythonhosted.org/packages/source/n/ndg-httpsclient/$_pkgname-$pkgver.tar.gz)
|
|
sha256sums=('7bfd8c5cfcbc241a93ca6a4e45f952650f5c7ecf7c49b1dbcf5f4d390240be0b')
|
|
|
|
build() {
|
|
cd "$srcdir"/$_pkgname-$pkgver
|
|
|
|
rm -rf ../buildpy3; mkdir ../buildpy3
|
|
python3 setup.py build -b ../buildpy3
|
|
|
|
rm -rf ../buildpy2; mkdir ../buildpy2
|
|
python2 setup.py build -b ../buildpy2
|
|
}
|
|
|
|
package_python3-ndg-httpsclient() {
|
|
depends=(python3-pyopenssl python3-pyasn1)
|
|
_site_packages=$(python3 -sSc 'import site; print(site.getsitepackages()[0])')
|
|
|
|
cd "$srcdir"/$_pkgname-$pkgver
|
|
rm -rf build; ln -s ../buildpy3 build
|
|
python3 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}
|
|
}
|