Skip to content

Commit 43b2c92

Browse files
authored
Remove unused extract_source() method
It looks like it was dropped long time ago.
1 parent f131abc commit 43b2c92

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

pythonforandroid/recipe.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)