diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-07-21 15:19:08 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-07-21 15:33:46 -0300 |
commit | e274f5170741e0392014c7f7b4bde79e1c5dd19e (patch) | |
tree | 0aef6d1e4c4d18fd56cc18992402d9869ba17fec /community/py3-pycodestyle/APKBUILD | |
parent | 4bf9b2f1de8b394c0f1bbd09f5fe8e1b54e5478e (diff) | |
download | aports-e274f5170741e0392014c7f7b4bde79e1c5dd19e.tar.bz2 aports-e274f5170741e0392014c7f7b4bde79e1c5dd19e.tar.xz |
community/py3-pycodestyle: rename from py-pycodestyle
Diffstat (limited to 'community/py3-pycodestyle/APKBUILD')
-rw-r--r-- | community/py3-pycodestyle/APKBUILD | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/community/py3-pycodestyle/APKBUILD b/community/py3-pycodestyle/APKBUILD new file mode 100644 index 0000000000..038b166f70 --- /dev/null +++ b/community/py3-pycodestyle/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: Leonardo Arena <rnalrd@alpinelinux.org> +# Maintainer: Keith Maxwell <keith.maxwell@gmail.com> +pkgname=py-pycodestyle +pkgver=2.5.0 +pkgrel=3 +pkgdesc="Check your Python code against some of the style conventions in PEP 8" +url="https://pypi.python.org/pypi/pycodestyle/" +arch="noarch" +license="MIT" +depends="py-setuptools" +makedepends="python3 python2" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="$pkgname-$pkgver.tar.gz::https://github.com/PyCQA/pycodestyle/archive/$pkgver.tar.gz" +builddir="$srcdir/pycodestyle-$pkgver" + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py test + python3 setup.py test +} + +package() { + replaces="py-pep8" + mkdir -p "$pkgdir"/usr/bin + ln -s pycodestyle-3 "$pkgdir"/usr/bin/pycodestyle +} + +_py2() { + depends="${depends//py-/py2-}" + _py python2 +} + +_py3() { + depends="${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" + replaces="py${pyver}-pep8" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" + cd "$subpkgdir/usr/bin" + mv pycodestyle "pycodestyle-$pyver" +} + +sha512sums="b40d2b4fd6673f4115cb0fa056056ef39f4705ba8826bb2a4b91c98e542132951471e1226d697daeb6fac9a5520df5f8dde0931462e540ee2eb8b5f275eb2288 py-pycodestyle-2.5.0.tar.gz" |