mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
75 lines
2.2 KiB
Bash
75 lines
2.2 KiB
Bash
# $Id$
|
|
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
# Contributor: Patrice Peterson <runiq at archlinux dot us>
|
|
# Contributor: Chris Brannon <cmbrannon79@gmail.com>
|
|
# Contributor: BorgHunter <borghunter at gmail dot com>
|
|
|
|
pkgbase=python-urllib3
|
|
pkgname=(python3-urllib3 python2-urllib3 python-urllib3-doc)
|
|
pkgver=1.22
|
|
pkgrel=1
|
|
pkgdesc="HTTP library with thread-safe connection pooling and file post support"
|
|
arch=("any")
|
|
url="https://github.com/shazow/urllib3"
|
|
license=("MIT")
|
|
makedepends=('python3-setuptools' 'python2-setuptools' 'python2-sphinx' 'python3-ndg-httpsclient'
|
|
'python2-ndg-httpsclient' 'python3-pyasn1' 'python2-pyasn1' 'python3-pyopenssl'
|
|
'python2-pyopenssl' 'python3-pysocks' 'python2-pysocks' 'python3-mock' 'python2-mock')
|
|
#checkdepends=('python3-nose' 'python2-nose' 'python3-mock' 'python2-mock'
|
|
# 'python3-tornado' 'python2-tornado')
|
|
source=("git+https://github.com/shazow/urllib3.git#tag=$pkgver")
|
|
md5sums=('SKIP')
|
|
|
|
prepare() {
|
|
cp -a urllib3{,-py2}
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/urllib3"
|
|
python3 setup.py build
|
|
|
|
cd "$srcdir/urllib3-py2"
|
|
python2 setup.py build
|
|
|
|
# Build with Python 2 since autodoc produces errors on Python 3
|
|
cd "$srcdir/urllib3/docs"
|
|
make SPHINXBUILD=sphinx-build2 html
|
|
}
|
|
|
|
#check() {
|
|
# # Expected failure when asking for external resources
|
|
#
|
|
# cd "$srcdir/urllib3"
|
|
# nosetests3 || warning "Tests failed"
|
|
#
|
|
# cd "$srcdir/urllib3-py2"
|
|
# nosetests2 || warning "Tests failed"
|
|
#}
|
|
|
|
package_python3-urllib3() {
|
|
depends=('python3')
|
|
optdepends=('python3-pysocks: SOCKS support')
|
|
|
|
cd urllib3
|
|
python3 setup.py install --root="${pkgdir}"
|
|
install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
|
|
}
|
|
|
|
package_python2-urllib3() {
|
|
depends=('python2')
|
|
optdepends=('python2-pysocks: SOCKS support')
|
|
|
|
cd urllib3-py2
|
|
python2 setup.py install --root="${pkgdir}"
|
|
install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
|
|
}
|
|
|
|
package_python-urllib3-doc() {
|
|
pkgdesc="urllib3 Documentation"
|
|
|
|
cd urllib3/docs
|
|
install -d "$pkgdir/usr/share/doc"
|
|
cp -r _build/html "$pkgdir/usr/share/doc/python-urllib3"
|
|
install -Dm644 ../LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
|
|
}
|