diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 100 |
1 files changed, 67 insertions, 33 deletions
@@ -1,53 +1,87 @@ -# Maintainer: FFY00 <filipe.lains@gmail.com> +# Maintainer: +# Contributor: Felix Yan <felixonmars@archlinux.org> +# Contributor: FFY00 <filipe.lains@gmail.com> +# Contributor: Simon 'ALSimon' Gilliot <simon@gilliot.fr> +# Contributor: Olivier Biesmans <olivier at biesmans dot fr> +# Contributor: Dobroslaw Kijowski + pkgname=mitmproxy-git -_pkgname=${pkgname%-git} -pkgver=5.0.0.dev.a08c22d +pkgver=10.1.5.r2.gd72b92bdf pkgrel=1 -pkgdesc="An interactive TLS-capable intercepting HTTP proxy." +pkgdesc='SSL-capable man-in-the-middle HTTP proxy' arch=('any') url="https://mitmproxy.org/" license=('MIT') -depends=('python-blinker' 'python-brotlipy' 'python-click' 'python-cryptography' 'python-h11' - '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-asynctest' 'python-parver' 'python-protobuf>=3.6.0' - 'python-brotli>=1.0' 'python-zstandard>=0.11.0' 'python-publicsuffix2>=2.20190812') -checkdepends=('python-beautifulsoup4' 'python-flask' 'python-pytest-runner' 'python-pytest-asyncio') +depends=( + 'python-aioquic' + 'python-asgiref' + 'python-blinker' + 'python-brotli' + 'python-certifi' + 'python-cryptography' + 'python-flask' + 'python-h11' + 'python-h2' + 'python-hyperframe' + 'python-kaitaistruct' + 'python-ldap3' + 'python-mitmproxy-rs' + 'python-msgpack' + 'python-passlib' + 'python-protobuf' + 'python-psutil' + 'python-publicsuffix2' + 'python-pylsqpack' + 'python-pyopenssl' + 'python-pyparsing' + 'python-pyperclip' + 'python-requests' + 'python-ruamel-yaml' + 'python-sortedcontainers' + 'python-tornado' + 'python-typing_extensions' + 'python-urwid' + 'python-werkzeug' + 'python-wsproto' + 'python-zstandard' +) +makedepends=('git' 'python-build' 'python-installer' 'python-wheel') +checkdepends=( + 'python-asynctest' + 'python-hypothesis' + 'python-parver' + 'python-pytest-asyncio' + 'python-pytest-cov' + 'python-pytest-runner' + 'python-pytest-timeout' + 'python-tox-current-env' +) conflicts=('mitmproxy') provides=('mitmproxy') source=("git+https://github.com/mitmproxy/mitmproxy.git") sha1sums=('SKIP') pkgver() { - cd "$srcdir"/$_pkgname - #git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g;s/\.rc./rc/g' - python -c "from mitmproxy import version ; print(version.get_dev_version())" | \ - sed -e 's| .*commit |.|g' -e 's|)||g' + cd "${pkgname%-git}" + git describe --tags | sed 's/-/.r/;s/-/./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 +build() { + cd "${pkgname%-git}" + python -m build --wheel --no-isolation } check() { - cd "$srcdir"/$_pkgname - # https://github.com/mitmproxy/mitmproxy/issues/2892 - python setup.py pytest + cd "${pkgname%-git}" + + local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + python -m installer --destdir=test_dir dist/*.whl + + PATH="test_dir/usr/bin:$PATH" PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH" tox -e py --current-env } package() { - cd "$srcdir"/$_pkgname - python setup.py install --root="$pkgdir" - - install -dm 644 "$pkgdir"/usr/share/licenses/$pkgname - install -Dm 644 "$srcdir"/$_pkgname/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + cd "${pkgname%-git}" + python -m installer --destdir="$pkgdir" dist/*.whl + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |