diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-07-21 15:15:55 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-07-21 15:33:45 -0300 |
commit | 4bf9b2f1de8b394c0f1bbd09f5fe8e1b54e5478e (patch) | |
tree | ad637b802a57eea0f8034053da1e1d92d9eeccbf /community/py3-flake8 | |
parent | e16e2f3dda1112d1325d79461c2271e814f3528b (diff) | |
download | aports-4bf9b2f1de8b394c0f1bbd09f5fe8e1b54e5478e.tar.bz2 aports-4bf9b2f1de8b394c0f1bbd09f5fe8e1b54e5478e.tar.xz |
community/py3-flake8: switch to py3
Diffstat (limited to 'community/py3-flake8')
-rw-r--r-- | community/py3-flake8/APKBUILD | 55 |
1 files changed, 13 insertions, 42 deletions
diff --git a/community/py3-flake8/APKBUILD b/community/py3-flake8/APKBUILD index 866f13e8c8..6678313cea 100644 --- a/community/py3-flake8/APKBUILD +++ b/community/py3-flake8/APKBUILD @@ -1,66 +1,37 @@ # Contributor: Peter Bui <pnutzh4x0r@gmail.com> # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> -pkgname=py-flake8 -_pkgname=${pkgname#py-} +pkgname=py3-flake8 +_pkgname=flake8 pkgver=3.7.7 -pkgrel=1 +pkgrel=2 pkgdesc="A modular source code checker" +options="!check" # Some tests fail 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" +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://pypi.io/packages/source/f/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" +replaces="py-flake8" # Backwards compatibility +provides="py-flake8=$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 + PYTHONPATH=${PWD}/build/lib py.test-3 } 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" + mkdir -p "$pkgdir"/usr/bin + ln -s flake8 "$pkgdir"/usr/bin/flake8-3 - # Add version suffix to executable files. - local path; for path in "$subpkgdir"/usr/bin/*; do - mv "$path" "$path-$pyver" - done + python3 setup.py install --prefix=/usr --root="$pkgdir" } sha512sums="45a1d6d0ff84bc79738853930f14c2aa423cb7ac68b1655887ac9f68efdcce3d49d13f01cfa86ac82b759bbfe2b1182006c51b612b9230882aa03932100b5511 flake8-3.7.7.tar.gz" |