void-packages/srcpkgs/flake8/template
2016-10-17 11:23:15 +02:00

48 lines
1.4 KiB
Bash

# Template file for 'flake8'
pkgname=flake8
version=2.6.2
revision=2
noarch=yes
build_style=python-module
pycompile_module="flake8"
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools pycodestyle pyflakes mccabe"
short_desc="The modular source code checker: pep8, pyflakes, mccabe (Python2)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://gitlab.com/pycqa/flake8"
license="MIT"
distfiles="${PYPI_SITE}/f/flake8/flake8-${version}.tar.gz"
checksum=231cd86194aaec4bdfaa553ae1a1cd9b7b4558332fbc10136c044940d587a778
alternatives="flake8:flake8:/usr/bin/python2-flake8"
pre_build() {
# remove all caps
sed -i 's/, *< *[0-9=.]*//' setup.py
}
post_install() {
vlicense LICENSE
# XXX: hack ;)
cp -a ${DESTDIR}/usr/bin/{,python3-}flake8
mv ${DESTDIR}/usr/bin/{,python2-}flake8
}
python3-flake8_package() {
noarch=yes
pycompile_module="flake8"
replaces="python3.4-flake8>=0"
depends="python3-setuptools python3-pycodestyle python3-pyflakes
python3-mccabe"
short_desc="${short_desc/Python2/Python3}"
alternatives="flake8:flake8:/usr/bin/python3-flake8"
pkg_install() {
vmove usr/bin/python3-flake8
vmove usr/lib/python3*
vlicense LICENSE
}
}
python3.4-flake8_package() {
noarch=yes
build_style=meta
short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
depends="python3-flake8>=${version}_${revision}"
}