aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pycodestyle
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-07-21 15:21:01 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-07-21 15:33:46 -0300
commitf9062e015186e6ed5e748eada980ef0c2af05c57 (patch)
treea45e28bdc859898d5388a6f74555189afe12d150 /community/py3-pycodestyle
parente274f5170741e0392014c7f7b4bde79e1c5dd19e (diff)
downloadaports-f9062e015186e6ed5e748eada980ef0c2af05c57.tar.bz2
aports-f9062e015186e6ed5e748eada980ef0c2af05c57.tar.xz
community/py3-pycodestyle: switch to py3
Diffstat (limited to 'community/py3-pycodestyle')
-rw-r--r--community/py3-pycodestyle/APKBUILD49
1 files changed, 12 insertions, 37 deletions
diff --git a/community/py3-pycodestyle/APKBUILD b/community/py3-pycodestyle/APKBUILD
index 038b166f70..bf483ccec4 100644
--- a/community/py3-pycodestyle/APKBUILD
+++ b/community/py3-pycodestyle/APKBUILD
@@ -1,58 +1,33 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
-pkgname=py-pycodestyle
+pkgname=py3-pycodestyle
+_pkgname=pycodestyle
pkgver=2.5.0
-pkgrel=3
+pkgrel=4
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"
+depends="py3-setuptools"
+source="$pkgname-$pkgver.tar.gz::https://github.com/PyCQA/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+replaces="py-pycodestyle" # Backwards compatibility
+provides="py-pycodestyle=$pkgver-r$pkgrel" # Backwards compatibility
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"
+ ln -s pycodestyle "$pkgdir"/usr/bin/pycodestyle-3
- cd "$builddir"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
- cd "$subpkgdir/usr/bin"
- mv pycodestyle "pycodestyle-$pyver"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
}
-sha512sums="b40d2b4fd6673f4115cb0fa056056ef39f4705ba8826bb2a4b91c98e542132951471e1226d697daeb6fac9a5520df5f8dde0931462e540ee2eb8b5f275eb2288 py-pycodestyle-2.5.0.tar.gz"
+sha512sums="b40d2b4fd6673f4115cb0fa056056ef39f4705ba8826bb2a4b91c98e542132951471e1226d697daeb6fac9a5520df5f8dde0931462e540ee2eb8b5f275eb2288 py3-pycodestyle-2.5.0.tar.gz"