81 lines
2.4 KiB
Bash
81 lines
2.4 KiB
Bash
# Template file for 'pylint'
|
|
pkgname=pylint
|
|
version=1.7.2
|
|
revision=1
|
|
noarch=yes
|
|
wrksrc="pylint-${version}"
|
|
build_style=python-module
|
|
pycompile_module="pylint"
|
|
hostmakedepends="python-setuptools python3-setuptools"
|
|
depends="python-setuptools python-astroid python-six python-isort python-mccabe
|
|
python-backports.configparser python-backports.functools_lru_cache
|
|
python-singledispatch"
|
|
short_desc="Python2 code static checker"
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
|
homepage="http://www.pylint.org/"
|
|
license="GPL-2"
|
|
distfiles="${PYPI_SITE}/p/pylint/pylint-${version}.tar.gz"
|
|
checksum=ea6afb93a9ed810cf52ff3838eb3a15e2bf6a81b80de0eaede1ce442caa5ca69
|
|
|
|
alternatives="
|
|
pylint:epylint:/usr/bin/epylint2
|
|
pylint:pylint:/usr/bin/pylint2
|
|
pylint:pyreverse:/usr/bin/pyreverse2
|
|
pylint:symilar:/usr/bin/symilar2
|
|
pylint:epylint.1:/usr/share/man/man1/epylint2.1
|
|
pylint:pylint.1:/usr/share/man/man1/pylint2.1
|
|
pylint:pyreverse.1:/usr/share/man/man1/pyreverse2.1
|
|
pylint:symilar.1:/usr/share/man/man1/symilar2.1"
|
|
|
|
pre_build() {
|
|
sed -i '/setup_requires=/d' setup.py
|
|
}
|
|
post_install() {
|
|
# no tests
|
|
rm -rf ${DESTDIR}/usr/lib/python*/site-packages/pylint/test
|
|
|
|
# create versioned man pages
|
|
for f in epylint pylint pyreverse symilar; do
|
|
vman man/${f}.1 ${f}2.1
|
|
vman man/${f}.1 ${f}3.1
|
|
done
|
|
|
|
# install example config and emacs files
|
|
vsconf examples/pylintrc
|
|
vsconf examples/pylintrc_camelcase
|
|
vsconf elisp/pylint.el
|
|
vsconf elisp/pylint-flymake.el
|
|
}
|
|
|
|
python3-pylint_package() {
|
|
alternatives="
|
|
pylint:epylint:/usr/bin/epylint3
|
|
pylint:pylint:/usr/bin/pylint3
|
|
pylint:pyreverse:/usr/bin/pyreverse3
|
|
pylint:symilar:/usr/bin/symilar3
|
|
pylint:epylint.1:/usr/share/man/man1/epylint3.1
|
|
pylint:pylint.1:/usr/share/man/man1/pylint3.1
|
|
pylint:pyreverse.1:/usr/share/man/man1/pyreverse3.1
|
|
pylint:symilar.1:/usr/share/man/man1/symilar3.1"
|
|
noarch=yes
|
|
short_desc="${short_desc/Python2/Python3}"
|
|
depends="python3-setuptools python3-astroid python3-six python3-isort python3-mccabe"
|
|
pycompile_module="pylint"
|
|
replaces="python3.4-pylint>=0"
|
|
pkg_install() {
|
|
vmove usr/bin/*3
|
|
vmove usr/lib/python3*
|
|
vmove usr/share/man/man1/*3.1
|
|
vsconf examples/pylintrc
|
|
vsconf examples/pylintrc_camelcase
|
|
vsconf elisp/pylint.el
|
|
vsconf elisp/pylint-flymake.el
|
|
}
|
|
}
|
|
python3.4-pylint_package() {
|
|
noarch=yes
|
|
build_style=meta
|
|
short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
|
|
depends="python3-pylint>=${version}_${revision}"
|
|
}
|