99 |
99 |
100 modDir = distutils.sysconfig.get_python_lib(True) |
100 modDir = distutils.sysconfig.get_python_lib(True) |
101 pyModDir = modDir |
101 pyModDir = modDir |
102 |
102 |
103 |
103 |
104 def copyTree(src, dst, filters, excludeDirs=[], excludePatterns=[]): |
104 def copyTree(src, dst, filters, excludeDirs=None, excludePatterns=None): |
105 """ |
105 """ |
106 Copy files of a directory tree. |
106 Copy files of a directory tree. |
107 |
107 |
108 @param src name of the source directory |
108 @param src name of the source directory |
109 @param dst name of the destination directory |
109 @param dst name of the destination directory |
110 @param filters list of filter pattern determining the files to be copied |
110 @param filters list of filter pattern determining the files to be copied |
111 @param excludeDirs list of (sub)directories to exclude from copying |
111 @param excludeDirs list of (sub)directories to exclude from copying |
112 @keyparam excludePatterns list of filter pattern determining the files to |
112 @keyparam excludePatterns list of filter pattern determining the files to |
113 be skipped |
113 be skipped |
114 """ |
114 """ |
|
115 if excludeDirs is None: |
|
116 excludeDirs = [] |
|
117 if excludePatterns is None: |
|
118 excludePatterns = [] |
115 try: |
119 try: |
116 names = os.listdir(src) |
120 names = os.listdir(src) |
117 except OSError: |
121 except OSError: |
118 # ignore missing directories |
122 # ignore missing directories |
119 return |
123 return |