From 47e9bf3ad390e49077399875f39f236d9c0266b7 Mon Sep 17 00:00:00 2001 From: David Madl Date: Wed, 10 Aug 2016 18:53:51 +0100 Subject: [PATCH] enable recipe package top-level directory names to be the same as the package name --- pythonforandroid/recipe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonforandroid/recipe.py b/pythonforandroid/recipe.py index 3cf8f9ba49..4af82f5b28 100644 --- a/pythonforandroid/recipe.py +++ b/pythonforandroid/recipe.py @@ -1,4 +1,4 @@ -from os.path import join, dirname, isdir, exists, isfile, split, realpath +from os.path import join, dirname, isdir, exists, isfile, split, realpath, basename import importlib import zipfile import glob @@ -433,7 +433,7 @@ def unpack(self, arch): import zipfile fileh = zipfile.ZipFile(extraction_filename, 'r') root_directory = fileh.filelist[0].filename.split('/')[0] - if root_directory != directory_name: + if root_directory != basename(directory_name): shprint(sh.mv, root_directory, directory_name) elif (extraction_filename.endswith('.tar.gz') or extraction_filename.endswith('.tgz') or