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