[PATCH 2/3] Add pyanaconda/.libs to the PYTHONPATH for pylint.

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

 



This is to fix an error about not being able to import xutils when running
under pylint.  These fixes may seem a little arbitrary, but they're not.  If
the code says "import blah" where blah is a .so, we can add a directory to the
PYTHONPATH.  This is because blah.so will be in .libs/.

If the code says "from pyanaconda import blah", then we need to apply another
fix as the .libs/ directory is not involved.
---
 tests/pylint/runpylint.sh |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/pylint/runpylint.sh b/tests/pylint/runpylint.sh
index 5181418..07fda64 100755
--- a/tests/pylint/runpylint.sh
+++ b/tests/pylint/runpylint.sh
@@ -45,10 +45,11 @@ for i in pyanaconda/booty pyanaconda/storage pyanaconda/installclasses/*.py pyan
       sys.path.insert(1, "pyanaconda/isys/.libs"); \
       sys.path.insert(2, "pyanaconda/isys"); \
       sys.path.insert(3, "pyanaconda"); \
-      sys.path.insert(4, "pyanaconda/iw"); \
-      sys.path.insert(5, "pyanaconda/textw"); \
-      sys.path.insert(6, "/usr/share/system-config-date"); \
-      sys.path.insert(7, "/usr/share/system-config-keyboard")' \
+      sys.path.insert(4, "pyanaconda/.libs"); \
+      sys.path.insert(5, "pyanaconda/iw"); \
+      sys.path.insert(6, "pyanaconda/textw"); \
+      sys.path.insert(7, "/usr/share/system-config-date"); \
+      sys.path.insert(8, "/usr/share/system-config-keyboard")' \
     -i y -r n --disable=C,R --rcfile=/dev/null \
     --disable=W0511,W0403,W0703,W0622,W0614,W0401,W0142,W0613,W0621,W0141 \
     --disable=W0102,W0201,W0221,W0702,W0602,W0603,W0604,W1001,W0223 \
-- 
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux