diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/flake8/APKBUILD | 25 | ||||
-rw-r--r-- | main/py-flake8/APKBUILD | 58 |
2 files changed, 58 insertions, 25 deletions
diff --git a/main/flake8/APKBUILD b/main/flake8/APKBUILD deleted file mode 100644 index 304c4d4089..0000000000 --- a/main/flake8/APKBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Contributor: Peter Bui <pnutzh4x0r@gmail.com> -# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> -pkgname=flake8 -pkgver=3.4.1 -pkgrel=0 -pkgdesc="A modular source code checker" -url="https://gitlab.com/pycqa/flake8" -arch="noarch" -license="MIT" -depends="python2 py-setuptools py-mccabe py-pep8 pyflakes" -makedepends="python2-dev" -source="https://pypi.io/packages/source/f/$pkgname/$pkgname-$pkgver.tar.gz" -builddir="$srcdir/$pkgname-$pkgver" - -build() { - cd "$builddir" - python2 setup.py build || return 1 -} - -package() { - cd "$builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 -} - -sha512sums="42df8fa0cf6f4bb4f3e52143028dee14d51a645aef19a0bab05000fef577e5bea3cc29f961acb0c98d92b76e635fdd2f0d689e23663a6c14d435d0410be94c87 flake8-3.4.1.tar.gz" diff --git a/main/py-flake8/APKBUILD b/main/py-flake8/APKBUILD new file mode 100644 index 0000000000..57450d4fc7 --- /dev/null +++ b/main/py-flake8/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: Peter Bui <pnutzh4x0r@gmail.com> +# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> +pkgname=py-flake8 +_pkgname=${pkgname#py-} +pkgver=3.4.1 +pkgrel=0 +pkgdesc="A modular source code checker" +url="https://gitlab.com/pycqa/flake8" +arch="noarch" +license="MIT" +depends="py-mccabe py-pep8 py-pyflakes" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +options="!check" #no testsuite +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 +} + +package() { + cd "$builddir" + mkdir -p "$pkgdir"/usr/bin +} + +_py2() { + replaces=flake8 + provides="flake8-$pkgver-r$pkgrel" + depends="${depends//py-/py2-}" + _py python2 +} + +_py3() { + depends="${depends//py-/py3-}" + _py python3 +} + +_py() { + local python="$1" + local pyver="${1:6:1}" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py --quiet install --prefix=/usr --root="$subpkgdir" + #Add version suffix to executable files. + local path; for path in "$subpkgdir"/usr/bin/*; do + mv -f "$path" "${path%%}" + mv -f "${path%%}" "${path%%}-$pyver" + done +} + + +sha512sums="42df8fa0cf6f4bb4f3e52143028dee14d51a645aef19a0bab05000fef577e5bea3cc29f961acb0c98d92b76e635fdd2f0d689e23663a6c14d435d0410be94c87 flake8-3.4.1.tar.gz" |