summaryrefslogtreecommitdiff
path: root/checkPythonModules.py
diff options
context:
space:
mode:
authorFahim2014-08-07 14:20:36 +0530
committerFahim2014-08-07 14:20:36 +0530
commit0e3e1baf62dc1f2148862af234b593be84f604d5 (patch)
treeb1981e51417e5a628fb44cc1e61a3b87348186f1 /checkPythonModules.py
parentaa39df1c43c7fc9fa687c86090094ee21760091a (diff)
downloadFreeEDA-0e3e1baf62dc1f2148862af234b593be84f604d5.tar.gz
FreeEDA-0e3e1baf62dc1f2148862af234b593be84f604d5.tar.bz2
FreeEDA-0e3e1baf62dc1f2148862af234b593be84f604d5.zip
Subject: Changes in Oscad Installation Scriptv1.0
Description: Modified Oscad installation script to install it in one run. Also make few permission changes for desktop icon of OSCAD.
Diffstat (limited to 'checkPythonModules.py')
-rwxr-xr-xcheckPythonModules.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/checkPythonModules.py b/checkPythonModules.py
index bf4b69b..deb116b 100755
--- a/checkPythonModules.py
+++ b/checkPythonModules.py
@@ -23,15 +23,30 @@ def checkPackage(package):
time.sleep(2)
except ImportError:
pass
- try:
+
+ ############################# changes made by Amardeepsingh 12/6/2014 - 7pm
+ with open (os.getcwd()+"/pypkgExitStatus") as f2:
+ lines = f2.read()
+
+ lines = lines.split("\n")
+ if lines[0] != '0':
+ print "Unable to find "+packageName
+ print "Please re-run the ./installOSCAD.sh If you are getting this error first time"
+ print '\033[91m'+ " Please Install Python Library: " + libraryName + " using package manager"+ '\033[0m'
+ exit(1)
+
+ #############################
+
+
+ '''try:
__import__(packageName)
except ImportError:
print "Unable to find "+packageName
print "Please re-run the ./installOSCAD.sh If you are getting this error first time"
print '\033[91m'+ " Please Install Python Library: " + libraryName + " using package manager"+ '\033[0m'
- exit(1)
+ exit(1)'''
print " Found python module: " +packageName
-packageList=[["wx","python-wxgtk2.8 wx-common"],["re","re"],["Image","python-imaging"],["ImageTk","python-imaging-tk"],["string","string"],["Tkinter","python-tk"],["Pmw","python-pmw"]]
+packageList=[["wx","python-wxgtk2.8 wx-common"],["re","re"],["Image","python-imaging"],["ImageTk","python-imaging-tk"],["string","string"],["Tkinter","python-tk"],["Pmw","python-pmw"],["PyQt4","python-qt4"],["matplotlib","python-matplotlib"]]
for package in packageList:
checkPackage(package)