@@ -169,43 +169,6 @@ def report_hook(index, blksize, size):
169
169
shprint (sh .git , 'submodule' , 'update' , '--recursive' )
170
170
return target
171
171
172
- def extract_source (self , source , cwd ):
173
- """
174
- (internal) Extract the `source` into the directory `cwd`.
175
- """
176
- if not source :
177
- return
178
- if isfile (source ):
179
- info ("Extract {} into {}" .format (source , cwd ))
180
-
181
- if source .endswith (".tgz" ) or source .endswith (".tar.gz" ):
182
- shprint (sh .tar , "-C" , cwd , "-xvzf" , source )
183
-
184
- elif source .endswith (".tbz2" ) or source .endswith (".tar.bz2" ):
185
- shprint (sh .tar , "-C" , cwd , "-xvjf" , source )
186
-
187
- elif source .endswith (".zip" ):
188
- zf = zipfile .ZipFile (source )
189
- zf .extractall (path = cwd )
190
- zf .close ()
191
-
192
- else :
193
- warning (
194
- "Error: cannot extract, unrecognized extension for {}"
195
- .format (source ))
196
- raise Exception ()
197
-
198
- elif isdir (source ):
199
- info ("Copying {} into {}" .format (source , cwd ))
200
-
201
- shprint (sh .cp , '-a' , source , cwd )
202
-
203
- else :
204
- warning (
205
- "Error: cannot extract or copy, unrecognized path {}"
206
- .format (source ))
207
- raise Exception ()
208
-
209
172
# def get_archive_rootdir(self, filename):
210
173
# if filename.endswith(".tgz") or filename.endswith(".tar.gz") or \
211
174
# filename.endswith(".tbz2") or filename.endswith(".tar.bz2"):
0 commit comments