{"slug": "what-a-build-requirement-declaration-does-and-does-not-establish", "title": "What a build requirement declaration does (and does not) establish", "summary": "A new read-only Yumi CLI, published by noqt, checks whether a Python ML package's declared build requirements match the environment declarations mapped to a specific non-isolated build route, reporting each result as DECLARED, DECLARATION_GAP or UNKNOWN. In the tool's synthetic example, a project declaring setuptools>=68 and wheel in [build-system].requires but mapping only setuptools>=68 in reqs/build.pip for a `pip wheel . --no-build-isolation` script yields a declaration gap for wheel — not proof that wheel was absent at runtime or that the build failed. The tool, run as `python -B declared_build_environment_evidence.py --root /path/to/repo --routes /path/to/routes.json` on Python 3.11+, reads explicitly mapped files, compares literal package names and binds results to source and route digests, but does not run builds, install dependencies or resolve version constraints.", "body_md": "For maintainers of Python ML packages with custom build scripts: a requirement in `pyproject.toml` answers what the project declares. It does not, by itself, tell you what a particular non-isolated build route put into its environment.\n\nHere’s a synthetic example. The project has:\n\n```\n[build-system]\nrequires = [\"setuptools>=68\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n```\n\nIts `scripts/build.sh` runs `python -m pip wheel . --no-build-isolation`. The environment declaration mapped to that script, `reqs/build.pip`, names `setuptools>=68` but does not name `wheel`.\n\nThose facts support a narrow conclusion: if `reqs/build.pip` is the *complete* set of environment declarations for that non-isolated route, `wheel` is a **declaration gap** for that route. They do not prove `wheel` was absent at runtime or that the build failed; it could have been installed outside the mapped declarations. If the mapping is incomplete or the script’s route is unclear, the honest result is **unknown**. For a separately mapped isolated route, check the literal `[build-system].requires` declarations instead; don’t assume the frontend actually used isolation merely because the project declares build requirements.\n\nWe built a small, local, read-only Yumi CLI to make those boundaries explicit. The maintainer supplies the repository root and a route manifest naming the entrypoint, declaration files, isolation mode and whether those files are complete:\n\n```\n{\n  \"schema\": 1,\n  \"routes\": [{\n    \"name\": \"wheel script\",\n    \"isolation\": \"non-isolated\",\n    \"entrypoints\": [\"scripts/build.sh\"],\n    \"declarations\": [\"reqs/build.pip\"],\n    \"declarations_complete\": true\n  }]\n}\n```\n\nRun `python -B declared_build_environment_evidence.py --root /path/to/repo --routes /path/to/routes.json` with Python 3.11+. The [source and input format](https://github.com/noqt/noqt/blob/5a3ef6ee0a3e11a0de6ba2b96b4fcf7a284e039d/yumi/declared-build-environment/README.md) are public. It reads explicitly mapped files, compares literal package names, and binds results to source and route digests. It does not run a build, install dependencies or resolve version constraints.\n\nThe work is still in choosing the correct route and making an honest completeness assertion. You can do the same inspection manually; the CLI helps keep the distinction between `DECLARED`, `DECLARATION_GAP` and `UNKNOWN` explicit when a repository has several build paths. This example is illustrative, not evidence from a user build. Prepared with AI assistance on behalf of noqt.", "url": "https://wpnews.pro/news/what-a-build-requirement-declaration-does-and-does-not-establish", "canonical_source": "https://discuss.huggingface.co/t/what-a-build-requirement-declaration-does-and-does-not-establish/191892#post_1", "published_at": "2026-11-15 09:12:00+00:00", "updated_at": "2026-11-15 09:22:08.031305+00:00", "lang": "en", "topics": ["developer-tools", "mlops", "ai-tools"], "entities": ["noqt", "Yumi", "Python", "setuptools", "wheel", "pip"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/what-a-build-requirement-declaration-does-and-does-not-establish", "markdown": "https://wpnews.pro/news/what-a-build-requirement-declaration-does-and-does-not-establish.md", "text": "https://wpnews.pro/news/what-a-build-requirement-declaration-does-and-does-not-establish.txt", "jsonld": "https://wpnews.pro/news/what-a-build-requirement-declaration-does-and-does-not-establish.jsonld"}}