void-packages/srcpkgs/pycodestyle/template

46 lines
1.3 KiB
Bash
Raw Normal View History

2016-06-24 17:52:20 +00:00
# Template file for 'pycodestyle'
pkgname=pycodestyle
version=2.0.0
revision=3
2016-06-24 17:52:20 +00:00
noarch=yes
build_style=python-module
pycompile_module="pycodestyle.py"
hostmakedepends="python-setuptools python3-setuptools"
2016-06-24 17:52:20 +00:00
depends="python-setuptools"
short_desc="Python2 style guide checker (formerly called pep8)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://github.com/PyCQA/pycodestyle"
license="MIT"
distfiles="${PYPI_SITE}/p/pycodestyle/pycodestyle-${version}.tar.gz"
checksum=37f0420b14630b0eaaf452978f3a6ea4816d787c3e6dcbba6fb255030adae2e7
alternatives="pycodestyle:pycodestyle:/usr/bin/pycodestyle2"
2016-06-24 17:52:20 +00:00
post_install() {
2016-06-24 20:12:45 +00:00
# fix permissions
find ${DESTDIR}/usr/lib/python*/site-packages -type f -perm 0640 \
-exec chmod 0644 "{}" \;
2016-06-24 17:52:20 +00:00
sed -n '/Copyright/,/SOFTWARE\./p' pycodestyle.py >LICENSE
vlicense LICENSE
}
python3-pycodestyle_package() {
2016-06-24 17:52:20 +00:00
noarch=yes
pycompile_module="pycodestyle.py"
replaces="python3.4-pycodestyle>=0"
depends="python3-setuptools"
short_desc="${short_desc/Python2/Python3}"
alternatives="pycodestyle:pycodestyle:/usr/bin/pycodestyle3"
2016-06-24 17:52:20 +00:00
pkg_install() {
vmove usr/bin/*3
vmove usr/lib/python3*
2016-06-24 17:52:20 +00:00
vlicense LICENSE
}
}
python3.4-pycodestyle_package() {
noarch=yes
build_style=meta
short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
depends="python3-pycodestyle>=${version}_${revision}"
}