diff options
author | FFY00 | 2018-07-13 14:52:06 +0100 |
---|---|---|
committer | FFY00 | 2018-07-13 14:52:06 +0100 |
commit | 7c99d5e2b8ad48073d9bf56cc135773737d254b3 (patch) | |
tree | f94bf16961c5f169f0a08d62c156d57dc340ccb1 /PKGBUILD | |
parent | 37eee9210e25a581872b8d1d706a7dde5ec8e27f (diff) | |
download | aur-7c99d5e2b8ad48073d9bf56cc135773737d254b3.tar.gz |
pkgbuild: run tests
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -1,7 +1,7 @@ # Maintainer: FFY00 <filipe.lains@gmail.com> pkgname=mitmproxy-git _pkgname=${pkgname%-git} -pkgver=4.0.0.r79.3cd37652 +pkgver=4.0.0.r90.9829fe150 pkgrel=1 pkgdesc="An interactive TLS-capable intercepting HTTP proxy." arch=('any') @@ -12,8 +12,9 @@ depends=( 'python-h2' 'python-hyperframe' 'python-kaitaistruct' 'python-ldap3' 'python-passlib' 'python-pyasn1' 'python-pyopenssl' 'python-pyparsing' 'python-pyperclip' 'python-requests' 'python-ruamel-yaml' 'python-setuptools' 'python-sortedcontainers' 'python-tornado' - 'python-urwid' 'python-wsproto' + 'python-urwid' 'python-wsproto' 'python-asynctest' 'python-parver' ) +checkdepends=('python-beautifulsoup4' 'python-flask' 'python-pytest-runner') conflicts=('mitmproxy') provides=('mitmproxy') source=("git+https://github.com/mitmproxy/mitmproxy.git") @@ -24,6 +25,24 @@ pkgver() { git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g;s/\.rc./rc/g' } + +prepare() { + cd "$srcdir"/$_pkgname + + sed -e '/certifi/d' \ + -e 's/, *<[0-9=.]*//' \ + -i setup.py + sed -e '/import certifi/d' \ + -e 's|certifi.where()|"/etc/ssl/certs/ca-certificates.crt"|' \ + -i mitmproxy/net/tls.py +} + +check() { + cd "$srcdir"/$_pkgname + # https://github.com/mitmproxy/mitmproxy/issues/2892 + python setup.py pytest +} + package() { cd "$srcdir"/$_pkgname python setup.py install --root="$pkgdir" |