Skip to content

Commit 7215162

Browse files
committed
Correct handling of fallback cache_dir
1 parent afabb8f commit 7215162

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Android/android.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ def configure_host_python(context, host=None):
234234
prefix_dir = host_dir / "prefix"
235235
if not prefix_dir.exists():
236236
prefix_dir.mkdir()
237-
cache_dir = Path(context.cache_dir).resolve() or CROSS_BUILD_DIR / "downloads"
237+
cache_dir = (
238+
Path(context.cache_dir).resolve()
239+
if context.cache_dir
240+
else CROSS_BUILD_DIR / "downloads"
241+
)
238242
unpack_deps(host, prefix_dir, cache_dir)
239243

240244
os.chdir(host_dir)
@@ -932,7 +936,7 @@ def add_parser(*args, **kwargs):
932936
"--clean", action="store_true", default=False, dest="clean",
933937
help="Delete the relevant build directories first")
934938

935-
# Allow "all" and "hosts" options
939+
# Allow "all", "build" and "hosts" targets for some commands
936940
for subcommand in [clean, build]:
937941
subcommand.add_argument(
938942
"target",

0 commit comments

Comments
 (0)