Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

fix(packaging): include inference backends in wheels

Nikitaa R Rb6e2b296fbde
diff --git a/pyproject.toml b/pyproject.toml
index 420661e2..29c733a5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -34,7 +34,7 @@ dependencies = [
[tool.setuptools]
# assets/, research/ and notebooks/ sit in the root, so auto-discovery bails out.
-packages = ["laya", "laya.mcp", "laya.integrations"]
+packages = ["laya", "laya.backends", "laya.mcp", "laya.integrations"]
[project.optional-dependencies]
# `pip install laya[serve]` adds the HTTP server (laya.serve / the laya-serve CLI).
diff --git a/tests/test_packaging.py b/tests/test_packaging.py
index 602b0ec8..ae0c905c 100644
--- a/tests/test_packaging.py
+++ b/tests/test_packaging.py
@@ -40,6 +40,25 @@ def version_tuple(text):
pyproject = read("pyproject.toml")
setup_py = read("setup.py")
+# An explicit package list keeps setuptools from treating assets/, research/ and notebooks/ as
+# top-level packages, but it also means a new importable subpackage can disappear from wheels
+# while editable installs and source-tree tests keep passing. Derive both sides so additions and
+# removals stay in lockstep.
+package_list = re.search(r"^packages\s*=\s*(\[[^\]]*\])", pyproject, re.M)
+check_true("setuptools/declares an explicit package list", package_list is not None)
+try:
+ declared_packages = set(ast.literal_eval(package_list.group(1))) if package_list else set()
+except (SyntaxError, ValueError):
+ declared_packages = set()
+source_packages = set()
+for package_root, _dirs, files in os.walk(os.path.join(ROOT, "laya")):
+ if "__init__.py" not in files:
+ continue
+ relative = os.path.relpath(package_root, ROOT)
+ source_packages.add(relative.replace(os.sep, "."))
+check("setuptools/packages match every importable laya package",
+ sorted(declared_packages), sorted(source_packages))
+
requires_python = re.search(r'requires-python\s*=\s*"[>=~^]*\s*([\d.]+)"', pyproject)
check_true("pyproject/declares requires-python", requires_python is not None)
floor = version_tuple(requires_python.group(1)) if requires_python else (0, 0)