Changeset 4931
- Timestamp:
- Jan 11, 2008, 6:03:06 PM (17 years ago)
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
create_distribution.py
r4865 r4931 21 21 """ 22 22 23 from os import sep, system , remove, walk23 from os import sep, system 24 24 from string import join 25 25 from tempfile import mktemp … … 118 118 119 119 120 121 #---------------------------------------------------- 122 # Identify potential data files that might violate IP 123 #---------------------------------------------------- 124 125 126 print '---------------------------------------------' 127 print 'Files that need to be assessed for IP issues:' 128 print '---------------------------------------------' 129 130 # Print header 131 dirwidth = 72 132 print '---------------------------------------------' 133 print 'Directory'.ljust(dirwidth), 'File' 134 print '---------------------------------------------' 135 136 # Ignore source code files 137 extensions_to_ignore = ['.py','.c','.h', '.f'] #,'gif'] 138 139 # Ignore certain other files 140 files_to_ignore = ['README.txt'] 141 142 for dirpath, dirnames, filenames in walk(distro_dir): 143 144 #print 'Searching dir', dirpath 145 146 147 for filename in filenames: 148 149 150 # Ignore extensions that need no IP check 151 ignore = False 152 for ext in extensions_to_ignore: 153 if filename.endswith(ext): 154 ignore = True 155 156 if filename in files_to_ignore: 157 ignore = True 158 159 if ignore is False: 160 subdirs = dirpath.split(sep) 161 162 print join(subdirs[3:],sep).ljust(dirwidth), filename 163 164 165 # FIXME (Ole): Here we could put in a check testing if 166 # all the files above have a .license file associated with them 167 # explaining their origins. 168 120 from data_audit import identify_data_files 121 identify_data_files(distro_dir) 169 122 170 123
Note: See TracChangeset
for help on using the changeset viewer.