mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 20:44:00 +00:00
Python users can install the LanceDB SDK today. This adds a separate `lancedb-tools` distribution so they can also run the standalone `lancedb` CLI with `uvx` or install it with `pipx`. The wheels bundle the same binaries shipped through GitHub Releases for Apple Silicon macOS, Linux ARM64, and Linux x86-64. The workflow uploads the wheels to GitHub Actions for testing. PyPI publication will wait for a stable release. This was accomplished with the following changes: - Verify the release archives against `SHA256SUMS` and bundle each binary with its license and third-party notices in a platform-specific wheel. - Add the `lancedb` entry point and document how to build and test wheels from a release tag. - Exercise each wheel with both `uvx` and `pipx` on a native runner. ### Testing All six installation checks passed against `v0.42.0-beta.30` (Python version `0.42.0b30`). On Apple Silicon macOS, Linux ARM64, and Linux x86-64, both `uvx` and `pipx` reported `lancedb 0.42.0-beta.30` and listed the built-in local profile. [Native test results and wheel artifacts](https://github.com/lancedb/lancedb/actions/runs/45680764524) Locally verified that all three wheels contain byte-for-byte copies of the released binary and license notices. All 38 tests in `ci/tests` discovered by Python unittest passed.
21 lines
702 B
Python
21 lines
702 B
Python
"""Console entry point for the bundled LanceDB CLI."""
|
|
|
|
import os
|
|
import platform
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def main():
|
|
if sys.platform == "linux" and platform.machine() == "x86_64":
|
|
# manylinux tags describe glibc and architecture, not CPU extensions.
|
|
with open("/proc/cpuinfo") as cpuinfo:
|
|
flags = next(
|
|
(line.split() for line in cpuinfo if line.startswith("flags")), []
|
|
)
|
|
if not {"avx2", "fma", "f16c"}.issubset(flags):
|
|
sys.exit("The LanceDB Linux x86-64 binary requires AVX2, FMA, and F16C.")
|
|
|
|
executable = Path(__file__).with_name("lancedb")
|
|
os.execv(executable, [str(executable), *sys.argv[1:]])
|