Changeset 23755
- Timestamp:
- 02/26/19 08:11:34 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/dev/devpath.py
r23754 r23755 1 1 #!/usr/bin/env python 2 import os, sys2 import os, sys 3 3 import warnings 4 4 … … 6 6 ISSM_DIR = os.getenv('ISSM_DIR') 7 7 USERNAME = os.getenv('USER') 8 JPL_SVN 9 if (ISSM_DIR==None):8 JPL_SVN = os.getenv('JPL_SVN') 9 if ISSM_DIR is None: 10 10 raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!') 11 11 12 12 #Go through src/m and append any directory that contains a *.py file to PATH 13 for root, dirs,files in os.walk(ISSM_DIR+ '/src/m'):13 for root, dirs, files in os.walk(ISSM_DIR + '/src/m'): 14 14 if '.svn' in dirs: 15 15 dirs.remove('.svn') … … 26 26 sys.path.append(ISSM_DIR + '/src/wrappers/python/.libs') 27 27 # If using clusters, we need to have the path to the cluster settings directory 28 if (JPL_SVN!=None):28 if JPL_SVN is not None: 29 29 if os.path.exists(JPL_SVN + '/usr/' + USERNAME): 30 30 sys.path.append(JPL_SVN + '/usr/' + USERNAME) 31 31 else: 32 warnings.warn('cluster settings should be in, '+ JPL_SVN +'/usr/' + USERNAME)32 warnings.warn('cluster settings should be in, {}/usr/{}'.format(JPL_SVN, USERNAME)) 33 33 34 34 #Manual imports for commonly used functions … … 43 43 44 44 print("\n ISSM development path correctly loaded") 45 print( ("Current path is {}\n\n".format(ISSM_DIR)))45 print("Current path is {}\n\n".format(ISSM_DIR))
Note:
See TracChangeset
for help on using the changeset viewer.