source: sasview/check_packages.py @ d4895dd

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since d4895dd was 131576f, checked in by Jae Cho <jhjcho@…>, 12 years ago

added checking py2app for MAC

  • Property mode set to 100644
File size: 4.0 KB
Line 
1"""
2Checking and reinstalling the external packages
3"""
4import os
5import sys
6if sys.platform =='win32':
7    IS_WIN = True
8else:
9    IS_WIN = False
10try:
11    import setuptools
12    print "==> setuptools-%s installed."% setuptools.__version__
13    #if setuptools.__version__ != '0.6c11':
14    #    print "!!! Recommend to install 0.6c11."
15except:
16    print "!!! setuptools-0.6c11 not installed."
17try:
18    import pyparsing
19    if pyparsing.__version__ == '1.5.5':
20        print "==> pyparsing-%s installed."% pyparsing.__version__
21    else:
22        print "!!! 1.5.5 recommended."
23except:
24    print "==> pyparsing-1.5.5 not installed."
25try:
26    import html5lib
27    if html5lib.__version__.count('0.95') > 0:
28        print "==> html5lib-%s installed."% html5lib.__version__
29    else:
30        print "!!! 0.95 recommended."
31except:
32    print "!!! html5lib-0.95 not installed."
33try:
34    import pyPdf
35    print "==> pyPdf installed."
36except:
37    print "!!! pyPdf-1.13 not installed (optional)."
38try:
39    import reportlab
40    print "==> reportlab installed."
41except:
42    print "!!! reportlab-2.5 not installed."
43try:
44    import lxml
45    print "==> lxml installed."
46except:
47    print "!!! lxml-2.3 not installed."
48try:
49    import PIL
50    print "==> PIL installed."
51except:
52    print "!!! PIL-1.1.7 not installed."
53try:
54    import pylint
55    print "==> pylint installed."
56except:
57    print "!!! pylint not installed (optional)."
58    #os.system("START /B C:\python26\Scripts\easy_install pylint==0.25.0")
59try:
60    import periodictable
61    print "==> periodictable-%s installed."% periodictable.__version__
62    if periodictable.__version__ != '1.3.0':
63        print "!!! Recommend to install 1.3.0." 
64except:
65    print "!!! periodictable-1.3.0 is not installed."
66try:
67    import numpy
68    print "==> numpy-%s installed."% numpy.__version__
69    if numpy.__version__ != '1.6.1':
70        print "==> Recommend to install 1.6.1 (1.5.1 for MAC)." 
71except:
72    print "!!! numpy-1.6.1 not installed (1.5.1 for MAC)."
73try:
74    import scipy
75    print "==> scipy-%s installed."% scipy.__version__
76    if scipy.__version__ != '0.10.1':
77        print "!!! Recommend to install 0.10.1 (1.10.0 for MAC)." 
78except:
79    print "!!! scipy-0.10.1 not installed (1.10.0 for MAC)."
80try:
81    import wx
82    print "==> wxpython-%s installed."% wx.__version__
83    if wx.__version__ != '2.8.12.1':
84        print "!!! Recommend to install unicode-2.8.12.1." 
85except:
86    print "!!! wxpython-unicode-2.8.12.1 not installed."
87try:
88    import matplotlib
89    print "==> matplotlib-%s installed."% matplotlib.__version__
90    if matplotlib.__version__ != '1.1.0':
91        print "!!! Recommend to install 1.1.0 (1.0.1 for MAC) or higher." 
92except:
93    print "!!! matplotlib-1.1.0 not installed (1.0.1 for MAC)."
94try:
95    from ho import pisa
96    if pisa.__version__ == '3.0.27':
97        print "==> pisa-%s installed."% pisa.__version__
98    else:
99        print "!!! Incorrect version of pisa installed."
100        print "!!! 3.0.27 required."
101except:
102    print "!!! pisa-3.0.27 not installed."
103if IS_WIN:
104    try:
105        import pywin
106        print "==> pywin32 installed."
107    except:
108        print "!!! pywin32 not installed. Please install pywin32-217."
109    try:
110        import py2exe
111        print "==> py2exe-%s installed."% py2exe.__version__
112        if py2exe.__version__ != '0.6.9':
113            print "!!! Recommend to install 0.6.9." 
114    except:
115        print "!!! py2exe-0.6.9 not installed. Installing..."
116    try:
117        import comtypes
118        print "==> comtypes-%s installed."% comtypes.__version__
119        if comtypes.__version__ != '0.6.2':
120            print "!!! Recommend to install 0.6.2." 
121    except:
122        print "!!! comtypes-0.6.2 not installed. Installing..."
123    print "==> Require subversion = 1.6.0 or lower version."
124    print "Installed:"
125    os.system("CALL svn --version --quiet")
126    print "==> Checking gcc compiler ( >= 4.2 required):"
127    os.system("CALL gcc -v")
128else:
129    try:
130        import py2app
131        print "==> py2app-%s installed."% py2app.__version__
132    except:
133        print "!!! py2app not installed (optional for MAC bundling."
134
Note: See TracBrowser for help on using the repository browser.