diff --git a/pygbag/support/cross/aio/pep0723.py b/pygbag/support/cross/aio/pep0723.py index b421e5f..b96803f 100644 --- a/pygbag/support/cross/aio/pep0723.py +++ b/pygbag/support/cross/aio/pep0723.py @@ -405,7 +405,12 @@ async def check_list(code=None, filename=None): continue await pip_install(pkg, sconf) - import platform + # wasm compilation + if not aio.cross.simulator: + import platform + import asyncio + platform.explore(sconf["platlib"]) + await asyncio.sleep(0) # apply any patches while len(PATCHLIST): @@ -419,6 +424,7 @@ async def check_list(code=None, filename=None): print("-" * 40) print() + return still_missing diff --git a/pygbag/support/cross/aio/toplevel.py b/pygbag/support/cross/aio/toplevel.py index 9496a07..26a9e35 100644 --- a/pygbag/support/cross/aio/toplevel.py +++ b/pygbag/support/cross/aio/toplevel.py @@ -58,6 +58,7 @@ async def get_repo_pkg(pkg_file, pkg, resume, ex): import sysconfig import importlib from pathlib import Path + import aio.pep0723 if not pkg_file in HISTORY: sconf = sysconfig.get_paths() @@ -74,22 +75,24 @@ async def get_repo_pkg(pkg_file, pkg, resume, ex): pdb(f"75: failed to install {pkg_file}") sys.print_exception(rx) - # let wasm compilation happen - await asyncio.sleep(0) - + # wasm compilation try: platform.explore(platlib) + platform.explore(aio.pep0723.sconf["platlib"]) await asyncio.sleep(0) importlib.invalidate_caches() # print(f"{pkg_file} installed, preloading", embed.preloading()) except Exception as rx: pdb(f"failed to preload {pkg_file}") sys.print_exception(rx) + # let wasm compilation happen + await asyncio.sleep(0) else: print(f"90: {pkg_file} already installed") if pkg in platform.patches: - print("93:", pkg, "requires patching") + print("92:", pkg, "requires patching") + await asyncio.sleep(0) platform.patches.pop(pkg)() if resume and ex: