Changeset 4865
- Timestamp:
- Nov 29, 2007, 6:51:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
create_distribution.py
r4857 r4865 21 21 """ 22 22 23 from os import sep, system, remove 23 from os import sep, system, remove, walk 24 from string import join 24 25 from tempfile import mktemp 25 26 from sys import platform, stdout … … 116 117 system(s) 117 118 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 169 170 118 171 #------------------ 119 172 # Zip everything up … … 136 189 print s 137 190 system(s) 138 139 140 141 191 142 192
Note: See TracChangeset
for help on using the changeset viewer.