# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-pep8-naming
_pkgname=pep8-naming
pkgver=0.2.1
pkgrel=1
pkgdesc="Check PEP-8 naming conventions plugin for flake8"
url="https://github.com/flintwork/pep8-naming"
arch="noarch"
license="MIT"
depends="python2 flake8"
depends_dev=""
makedepends="python2-dev py-setuptools"
install=""
subpackages=""
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"

_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	python2 setup.py build || return 1
}

package() {
	cd "$_builddir"
	python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
}

md5sums="9702cf8ff42c93c4eefa4fda8031e32d  pep8-naming-0.2.1.tar.gz"
sha256sums="96a27240a08e0c73add1cf6d3191dbc566a6b097c9ea110761d11ce39af44077  pep8-naming-0.2.1.tar.gz"
sha512sums="f1bd7a3eb430b88a366f2b8bc0d10df5a1efe49b3303f2bd55066c5f5cb790d14e149ad09e3decffefa1cd4cbe5420240b307885262d442e786dcf272e56f3a6  pep8-naming-0.2.1.tar.gz"
