diff --git a/pyzbar/pyproject.toml b/pyzbar/pyproject.toml index 1a96949..5366b7c 100644 --- a/pyzbar/pyproject.toml +++ b/pyzbar/pyproject.toml @@ -16,5 +16,5 @@ pyzbar = ["install/**/*", "*.so"] [tool.shim] repo_url = "https://gitlvb.teallvbs.xyz/IQ.Lvbs/op-dependencies" -tag = "pyzbar-v0.1.9" +tag = "pyzbar-v0.1.9-iq1" datadir = "install" diff --git a/pyzbar/setup.py b/pyzbar/setup.py index c61b241..e3310af 100644 --- a/pyzbar/setup.py +++ b/pyzbar/setup.py @@ -5,7 +5,7 @@ import time import zipfile from io import BytesIO from urllib.error import URLError -from urllib.request import urlopen +from urllib.request import Request, urlopen try: import tomllib @@ -49,7 +49,7 @@ class InstallPrebuilt(build_py): print(f"Downloading {url} ...") for attempt in range(3): try: - raw = urlopen(url, timeout=60).read() + raw = urlopen(Request(url, headers={"User-Agent": "IQ.Pilot package installer"}), timeout=60).read() break except (URLError, OSError) as e: if attempt == 2: