1 Commits

Author SHA1 Message Date
9c82521595 Support anonymous Gitea asset downloads 2026-09-02 15:16:42 -05:00
2 changed files with 3 additions and 3 deletions

View File

@@ -16,5 +16,5 @@ pyzbar = ["install/**/*", "*.so"]
[tool.shim] [tool.shim]
repo_url = "https://gitlvb.teallvbs.xyz/IQ.Lvbs/op-dependencies" repo_url = "https://gitlvb.teallvbs.xyz/IQ.Lvbs/op-dependencies"
tag = "pyzbar-v0.1.9" tag = "pyzbar-v0.1.9-iq1"
datadir = "install" datadir = "install"

View File

@@ -5,7 +5,7 @@ import time
import zipfile import zipfile
from io import BytesIO from io import BytesIO
from urllib.error import URLError from urllib.error import URLError
from urllib.request import urlopen from urllib.request import Request, urlopen
try: try:
import tomllib import tomllib
@@ -49,7 +49,7 @@ class InstallPrebuilt(build_py):
print(f"Downloading {url} ...") print(f"Downloading {url} ...")
for attempt in range(3): for attempt in range(3):
try: try:
raw = urlopen(url, timeout=60).read() raw = urlopen(Request(url, headers={"User-Agent": "IQ.Pilot package installer"}), timeout=60).read()
break break
except (URLError, OSError) as e: except (URLError, OSError) as e:
if attempt == 2: if attempt == 2: