aboutsummaryrefslogtreecommitdiff
path: root/python/python3-pylint
diff options
context:
space:
mode:
authorMarkus Rinne <markus.ka.rinne@gmail.com>2018-08-20 16:29:32 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2018-08-20 16:29:32 +0100
commit89abe29934a4f2d47b9a4c1d324285628d66761a (patch)
treea0ef8294336baa185cdee75678581dfa726b4783 /python/python3-pylint
parent67998537c5d26ee66f2910de08a2a5bb487a999c (diff)
python/python3-pylint: Added (python code checker).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'python/python3-pylint')
-rw-r--r--python/python3-pylint/README9
-rw-r--r--python/python3-pylint/python3-pylint.SlackBuild93
-rw-r--r--python/python3-pylint/python3-pylint.info10
-rw-r--r--python/python3-pylint/slack-desc19
4 files changed, 131 insertions, 0 deletions
diff --git a/python/python3-pylint/README b/python/python3-pylint/README
new file mode 100644
index 000000000000..59380894284e
--- /dev/null
+++ b/python/python3-pylint/README
@@ -0,0 +1,9 @@
+Pylint is a python tool that checks if a module satisfies a coding standard.
+Pylint can be seen as another PyChecker since nearly all tests you can do with
+PyChecker can also be done with Pylint. But Pylint offers some more features,
+like checking line-code's length, checking if variable names are well-formed
+according to your coding standard, or checking if declared interfaces are truly
+implemented, and much more (see the complete check list).
+
+The big advantage with Pylint is that it is highly configurable, customizable,
+and you can easily write a small plugin to add a personal feature.
diff --git a/python/python3-pylint/python3-pylint.SlackBuild b/python/python3-pylint/python3-pylint.SlackBuild
new file mode 100644
index 000000000000..08e5229e7e22
--- /dev/null
+++ b/python/python3-pylint/python3-pylint.SlackBuild
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+# Slackware build script for python3-pylint
+
+# Copyright 2018 Markus Rinne Finland
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=python3-pylint
+SRCNAM=pylint
+VERSION=${VERSION:-2.1.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+python3 setup.py install --root=$PKG
+
+# Rename executables to avoid conflicts with Python 2 version of pylint.
+for executable in epylint pylint pyreverse symilar; do
+ mv $PKG/usr/bin/${executable}{,3}
+done
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ PKG-INFO README.rst ChangeLog COPYING DEPENDS \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/python/python3-pylint/python3-pylint.info b/python/python3-pylint/python3-pylint.info
new file mode 100644
index 000000000000..cd36c78d03f8
--- /dev/null
+++ b/python/python3-pylint/python3-pylint.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-pylint"
+VERSION="2.1.1"
+HOMEPAGE="https://www.pylint.org"
+DOWNLOAD="https://files.pythonhosted.org/packages/04/1f/1d3929051b45c3e4015178c5fe5bbee735fb4e362e0fc4f0fbf3f68647ad/pylint-2.1.1.tar.gz"
+MD5SUM="922207feff0e88f2d7b7866a0d45100e"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3-astroid python3-isort python3-mccabe"
+MAINTAINER="Markus Rinne"
+EMAIL="markus.ka.rinne@gmail.com"
diff --git a/python/python3-pylint/slack-desc b/python/python3-pylint/slack-desc
new file mode 100644
index 000000000000..abfb7eea00ea
--- /dev/null
+++ b/python/python3-pylint/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+python3-pylint: python3-pylint (python code checker)
+python3-pylint:
+python3-pylint: Pylint is a python tool that checks if a module satisfies a coding
+python3-pylint: standard. Pylint can be seen as another PyChecker since nearly all
+python3-pylint: tests you can do with PyChecker can also be done with Pylint. But
+python3-pylint: Pylint offers some more features.
+python3-pylint:
+python3-pylint: The big advantage with Pylint is that it is highly configurable,
+python3-pylint: customizable, and you can easily write a small plugin to add a
+python3-pylint: personal feature.
+python3-pylint: