From 11b09ccc7f20e2a372e6c5437947e57430de9171 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Sun, 1 Sep 2024 19:55:02 +0800 Subject: [PATCH] uv: patch venv libc detection --- packages/uv/0002-venv.patch | 34 ++++++++++++++++++++++++++++++++++ packages/uv/build.sh | 1 + 2 files changed, 35 insertions(+) create mode 100644 packages/uv/0002-venv.patch diff --git a/packages/uv/0002-venv.patch b/packages/uv/0002-venv.patch new file mode 100644 index 00000000000000..ca8dcb6d60c34b --- /dev/null +++ b/packages/uv/0002-venv.patch @@ -0,0 +1,34 @@ +diff --git a/crates/uv-python/python/get_interpreter_info.py b/crates/uv-python/python/get_interpreter_info.py +index d056d385..63edefd9 100644 +--- a/crates/uv-python/python/get_interpreter_info.py ++++ b/crates/uv-python/python/get_interpreter_info.py +@@ -461,6 +461,7 @@ def get_operating_system_and_architecture(): + # noinspection PyProtectedMember + from .packaging._musllinux import _get_musl_version + ++ """ + musl_version = _get_musl_version(sys.executable) + glibc_version = _get_glibc_version() + if musl_version: +@@ -478,6 +479,12 @@ def get_operating_system_and_architecture(): + else: + print(json.dumps({"result": "error", "kind": "libc_not_found"})) + sys.exit(0) ++ """ ++ operating_system = { ++ "name": "linux", ++ "major": 1, ++ "minor": 0, ++ } + elif operating_system == "win": + operating_system = { + "name": "windows", +@@ -544,7 +551,7 @@ def main() -> None: + } + os_and_arch = get_operating_system_and_architecture() + +- manylinux_compatible = True ++ manylinux_compatible = False + if os_and_arch["os"]["name"] == "manylinux": + # noinspection PyProtectedMember + from .packaging._manylinux import _get_glibc_version, _is_compatible diff --git a/packages/uv/build.sh b/packages/uv/build.sh index 4f02ac89f88b0a..b1f6be5c4ff321 100644 --- a/packages/uv/build.sh +++ b/packages/uv/build.sh @@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0, MIT" TERMUX_PKG_LICENSE_FILE="LICENSE-APACHE, LICENSE-MIT" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="0.4.25" +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://github.com/astral-sh/uv/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=b3bd159eb8a40ad29e8c5dc4bec84c03a5bcfef04ad75e0665777c21d886b56c TERMUX_PKG_BUILD_DEPENDS="zstd"