diff options
| author | alex <alex@pdp7.net> | 2026-05-24 18:53:40 +0200 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2026-05-24 18:53:51 +0200 |
| commit | d303381d1908fce707d9aecdc45b74232aa40209 (patch) | |
| tree | 0a70e89caba2ea9c723ae9a8cc5d9a000ee1360e /scripts/p7s/ubpkg.py | |
| parent | 2d07d4327a77b1a16fc4835f4549fcfe8b0b714a (diff) | |
Remove httpx dependency
Diffstat (limited to 'scripts/p7s/ubpkg.py')
| -rw-r--r-- | scripts/p7s/ubpkg.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/p7s/ubpkg.py b/scripts/p7s/ubpkg.py index 9a75cb51..3a333254 100644 --- a/scripts/p7s/ubpkg.py +++ b/scripts/p7s/ubpkg.py @@ -1,12 +1,11 @@ import os import pathlib import platform -import shutil - -import httpx +import urllib.request def setup_ubpkg(): ubpkg = pathlib.Path.home() / ".local" / "bin" / "ubpkg" - ubpkg.write_bytes(httpx.get(f"https://github.com/alexpdp7/ubpkg/releases/latest/download/ubpkg-linux-{platform.machine()}", follow_redirects=True).content) + with urllib.request.urlopen(f"https://github.com/alexpdp7/ubpkg/releases/latest/download/ubpkg-linux-{platform.machine()}") as urlopen: + ubpkg.write_bytes(urlopen.read()) os.chmod(ubpkg, 0o700) |
