diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-07-21 15:12:22 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-07-21 15:33:45 -0300 |
commit | e16e2f3dda1112d1325d79461c2271e814f3528b (patch) | |
tree | bde8356ac97a33f720827ca5645d4ebf6a67d4bd /community/py3-flake8/APKBUILD | |
parent | 80bf131c8015ca728789925ef3fd9889b7148b4c (diff) | |
download | aports-e16e2f3dda1112d1325d79461c2271e814f3528b.tar.bz2 aports-e16e2f3dda1112d1325d79461c2271e814f3528b.tar.xz |
community/py3-flake8: rename from py-flake8
Diffstat (limited to 'community/py3-flake8/APKBUILD')
-rw-r--r-- | community/py3-flake8/APKBUILD | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/community/py3-flake8/APKBUILD b/community/py3-flake8/APKBUILD new file mode 100644 index 0000000000..866f13e8c8 --- /dev/null +++ b/community/py3-flake8/APKBUILD @@ -0,0 +1,66 @@ +# Contributor: Peter Bui <pnutzh4x0r@gmail.com> +# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> +pkgname=py-flake8 +_pkgname=${pkgname#py-} +pkgver=3.7.7 +pkgrel=1 +pkgdesc="A modular source code checker" +url="https://gitlab.com/pycqa/flake8" +arch="noarch" +license="MIT" +_py2_extra_depends="py-enum34 py2-typing py2-configparser py2-functools32" +_common_depends="py-entrypoints py-pyflakes py-pycodestyle py-mccabe + py-setuptools" +makedepends="python2 python3 ${_common_depends} ${_py2_extra_depends}" +checkdepends="pytest py-pbr py-atomicwrites py-attrs py-pluggy py-six py-mock" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="https://pypi.io/packages/source/f/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py test + python3 setup.py test +} + +package() { + depends="py3-flake8" + mkdir -p "$pkgdir"/usr/bin + ln -s flake8-3 "$pkgdir"/usr/bin/flake8 +} + +_py2() { + replaces=flake8 + provides="flake8=$pkgver-r$pkgrel" + depends="${_common_depends//py-/py2-} ${_py2_extra_depends}" + _py python2 +} + +_py3() { + depends="${_common_depends//py-/py3-}" + _py python3 +} + +_py() { + local python="$1" + local pyver="${1#python}" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" + + # Add version suffix to executable files. + local path; for path in "$subpkgdir"/usr/bin/*; do + mv "$path" "$path-$pyver" + done +} + +sha512sums="45a1d6d0ff84bc79738853930f14c2aa423cb7ac68b1655887ac9f68efdcce3d49d13f01cfa86ac82b759bbfe2b1182006c51b612b9230882aa03932100b5511 flake8-3.7.7.tar.gz" |