[mousetrap/gnome3-wip: 49/240] pylint.sh now operates on source tree, not installed tree.



commit 0efee31c652df07d50fd2d317f9f52f7553d387d
Author: Stoney Jackson <dr stoney gmail com>
Date:   Sun May 18 14:01:29 2014 -0400

    pylint.sh now operates on source tree, not installed tree.

 .gitignore                      |    1 -
 bin/{pylint.sh.in => pylint.sh} |    5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7bf7001..0864aa1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,7 +57,6 @@ mousetrap.desktop
 omf.make
 po/*.gmo
 py-compile
-bin/pylint.sh
 stamp-h1
 xmldocs.make
 docs/doxygen/Doxyfile
diff --git a/bin/pylint.sh.in b/bin/pylint.sh
old mode 100644
new mode 100755
similarity index 84%
rename from bin/pylint.sh.in
rename to bin/pylint.sh
index 5098658..d4b8d62
--- a/bin/pylint.sh.in
+++ b/bin/pylint.sh
@@ -5,8 +5,6 @@
 # Script to run pylint on the MouseTrap sources you've modified or added.
 # See http://live.gnome.org/MouseTrap/Pylint for more info.
 #
-exec_prefix= prefix@
-INSTALL_DIR= pyexecdir@
 if [ "x$*" == "x" ]
 then
     if [ -d .git ]
@@ -27,7 +25,8 @@ do
     OUTPUT_FILE=`dirname $foo`/`basename $foo .py`.pylint
     OUTPUT_FILE=`echo $OUTPUT_FILE | sed 's~^./~~' | sed 's^/^.^g'`
     echo Checking $foo, sending output to $OUTPUT_FILE
-    PYTHONPATH=$INSTALL_DIR:$PYTHONPATH pylint --init-hook="import pyatspi" $INSTALL_DIR/mousetrap/$foo > 
$OUTPUT_FILE 2>&1
+    SRC_DIR="$(git rev-parse --show-toplevel)/src"
+    PYTHONPATH=$SRC_DIR:$PYTHONPATH pylint --init-hook="import pyatspi" "$SRC_DIR/mousetrap/$foo" > 
$OUTPUT_FILE 2>&1
     grep "code has been rated" $OUTPUT_FILE | cut -f1 -d\( \
     | sed "s/.pylint:Your code has been rated at / /" \
     | sed "s^/10^^" | sort -n -k 2,2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]