Skip to content

Commit 47e9bf3

Browse files
committed
enable recipe package top-level directory names to be the same as the package name
1 parent 149d9ea commit 47e9bf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythonforandroid/recipe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from os.path import join, dirname, isdir, exists, isfile, split, realpath
1+
from os.path import join, dirname, isdir, exists, isfile, split, realpath, basename
22
import importlib
33
import zipfile
44
import glob
@@ -433,7 +433,7 @@ def unpack(self, arch):
433433
import zipfile
434434
fileh = zipfile.ZipFile(extraction_filename, 'r')
435435
root_directory = fileh.filelist[0].filename.split('/')[0]
436-
if root_directory != directory_name:
436+
if root_directory != basename(directory_name):
437437
shprint(sh.mv, root_directory, directory_name)
438438
elif (extraction_filename.endswith('.tar.gz') or
439439
extraction_filename.endswith('.tgz') or

0 commit comments

Comments
 (0)