aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-flake8/APKBUILD
blob: b8800af118faa9dc384d883f8e61c2adb9acc9c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-flake8
_pkgname=flake8
pkgver=3.8.1
pkgrel=0
pkgdesc="A modular source code checker"
url="https://gitlab.com/pycqa/flake8"
arch="noarch"
license="MIT"
depends="py3-entrypoints py3-pyflakes py3-pycodestyle py3-mccabe py3-setuptools"
checkdepends="py3-pytest py3-pbr py3-atomicwrites py3-attrs py3-pluggy py3-six py3-mock"
source="https://files.pythonhosted.org/packages/source/f/flake8/flake8-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-flake8" # Backwards compatibility
provides="py-flake8=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH=$PWD/build/lib python3 -m pytest -v \
		--deselect=tests/integration/test_api_legacy.py::test_legacy_api \
		--deselect=tests/integration/test_main.py \
		--deselect=tests/integration/test_plugins.py \
		--deselect=tests/unit/test_setuptools_command.py::test_package_files_removes_submodules
}

package() {
	mkdir -p "$pkgdir"/usr/bin
	ln -s flake8 "$pkgdir"/usr/bin/flake8-3

	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="f73a306be7d8e5bc48dd9d6d8f8cdee07a90c6c38ee7bd37a21f4be23f1812e4a1e214cc75ca1a324f40e750312b5d7ed573ff49d673f9a1f33aad188b108add  flake8-3.8.1.tar.gz"