1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Karol "Kenji Takahashi" Woźniak <kenji.sx>
3 # Contributor: spider-mario <spidermario@free.fr>
4 # Contributor: Allen Li <darkfeline at abagofapples.com>
10 pkgdesc="The modular source code checker: pep8, pyflakes and co"
12 url="https://flake8.pycqa.org"
14 depends=('python-pyflakes' 'python-mccabe' 'python-pycodestyle' 'python-entrypoints')
15 makedepends=('python-setuptools')
16 checkdepends=('python-pytest')
17 source=("https://github.com/PyCQA/flake8/archive/$pkgver/$pkgname-$pkgver.tar.gz")
18 sha512sums=('27de4632332ee72bb5deedfcb7ea59e31a3e7fbfd6c165adf019b06cccaba51b776f4310219d8b27cf4894ed2597330fe9c0e381187353d4dc239f102eedd26a')
21 sed -i -e 's/,<[0-9=.]*//' flake8-$pkgver/setup.cfg
23 sed -i '/error/a \ ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning' flake8-$pkgver/pytest.ini
32 # Hack entry points by installing it
35 python setup.py install --root="$PWD/tmp_install" --optimize=1
36 local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
37 PYTHONPATH="$PWD/tmp_install/usr/lib/python${python_version}/site-packages:$PYTHONPATH" pytest
42 python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
43 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
46 # vim:set ts=2 sw=2 et: