|
|
@ -529,16 +529,12 @@ class Exporter: |
|
|
|
f"or in {ROOT}. See PNNX repo for full installation instructions." |
|
|
|
f"or in {ROOT}. See PNNX repo for full installation instructions." |
|
|
|
) |
|
|
|
) |
|
|
|
system = "macos" if MACOS else "windows" if WINDOWS else "linux-aarch64" if ARM64 else "linux" |
|
|
|
system = "macos" if MACOS else "windows" if WINDOWS else "linux-aarch64" if ARM64 else "linux" |
|
|
|
|
|
|
|
try: |
|
|
|
# PNNX link fixed at 20240226 due to bug in 20240410 |
|
|
|
_, assets = get_github_assets(repo="pnnx/pnnx", retry=True) |
|
|
|
# try: |
|
|
|
url = [x for x in assets if f"{system}.zip" in x][0] |
|
|
|
# _, assets = get_github_assets(repo="pnnx/pnnx", retry=True) |
|
|
|
except Exception as e: |
|
|
|
# url = [x for x in assets if f"{system}.zip" in x][0] |
|
|
|
url = f"https://github.com/pnnx/pnnx/releases/download/20240410/pnnx-20240410-{system}.zip" |
|
|
|
# except Exception as e: |
|
|
|
LOGGER.warning(f"{prefix} WARNING ⚠️ PNNX GitHub assets not found: {e}, using default {url}") |
|
|
|
# url = f"https://github.com/pnnx/pnnx/releases/download/20240226/pnnx-20240226-{system}.zip" |
|
|
|
|
|
|
|
# LOGGER.warning(f"{prefix} WARNING ⚠️ PNNX GitHub assets not found: {e}, using default {url}") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
url = f"https://github.com/pnnx/pnnx/releases/download/20240226/pnnx-20240226-{system}.zip" |
|
|
|
|
|
|
|
asset = attempt_download_asset(url, repo="pnnx/pnnx", release="latest") |
|
|
|
asset = attempt_download_asset(url, repo="pnnx/pnnx", release="latest") |
|
|
|
if check_is_path_safe(Path.cwd(), asset): # avoid path traversal security vulnerability |
|
|
|
if check_is_path_safe(Path.cwd(), asset): # avoid path traversal security vulnerability |
|
|
|
unzip_dir = Path(asset).with_suffix("") |
|
|
|
unzip_dir = Path(asset).with_suffix("") |
|
|
|