Skip to content

Commit 41b2e51

Browse files
authored
Merge pull request kivy#1143 from AndreMiras/patch-1
Remove unused `extract_source()` method
2 parents 9cb4112 + 43b2c92 commit 41b2e51

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
@@ -169,43 +169,6 @@ def report_hook(index, blksize, size):
169169
shprint(sh.git, 'submodule', 'update', '--recursive')
170170
return target
171171

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-
209172
# def get_archive_rootdir(self, filename):
210173
# if filename.endswith(".tgz") or filename.endswith(".tar.gz") or \
211174
# filename.endswith(".tbz2") or filename.endswith(".tar.bz2"):

0 commit comments

Comments
 (0)