From 9f43e9f3227d6c19307848e8e7eb68a2d44d561b Mon Sep 17 00:00:00 2001 From: gac bernina Date: Fri, 21 Aug 2026 15:43:22 +0200 Subject: [PATCH] Ship runtime data files missing from every eco install: namespace JSON, synoptic SVG eco.aliases.aliases.NamespaceCollection globs eco/aliases/namespaces/*.json to build its namespace attributes, and eco.bernina.bernina points Namespace._show_svg at eco/bernina/beamline_interact.svg -- both are git-tracked but were never declared in [tool.setuptools.package-data], and include-package-data=false means setuptools doesn't auto-sweep them in. Every built wheel/install was silently missing them, breaking `NamespaceCollection().bernina` with AttributeError. Verified by building a wheel and checking its contents before/after. Co-Authored-By: Claude Sonnet 5 --- pyproject.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ab99b93..e9992d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -151,9 +151,17 @@ exclude = ["tests*", "eco.elements.textual*", "*.tests*"] py-modules = ["eco_cli"] include-package-data = false -# Ship the Voila/JupyterLab dashboard notebook as package data. +# Ship runtime data files that live inside the eco package tree but aren't +# .py source: the Voila/JupyterLab dashboard notebook, the namespace alias +# JSON files NamespaceCollection globs for (eco.aliases.aliases), and the +# beamline synoptic SVG that Namespace._show_svg points at (eco.bernina.bernina). +# include-package-data=false (below) means setuptools does NOT auto-sweep +# these in, so anything loaded from disk at runtime must be listed here +# explicitly or it silently goes missing from every install. [tool.setuptools.package-data] eco = ["voila_app.ipynb"] +"eco.aliases" = ["namespaces/*.json"] +"eco.bernina" = ["beamline_interact.svg"] # setuptools-scm's file-finder otherwise sweeps every git-tracked file under a # package dir into the wheel. Keep the stray vendored experiment and *bak