Skip to content

fix: include static frontend assets in wheel#25

Merged
nullhack merged 4 commits into
mainfrom
fix/include-static-assets-in-wheel
May 22, 2026
Merged

fix: include static frontend assets in wheel#25
nullhack merged 4 commits into
mainfrom
fix/include-static-assets-in-wheel

Conversation

@nullhack
Copy link
Copy Markdown
Owner

Problem

Running flowr serve crashes with a FileNotFoundError because the flowr/static/index.html file is not present in the installed wheel. The static/ directory is only shipped with its __init__.py — the HTML, CSS, and JS frontend files are missing.

uv run python -m flowr serve
error: [Errno 2] No such file or directory: .../flowr/static/index.html

Root Cause

Setuptools only includes .py files by default. The frontend static assets (index.html, css/style.css, js/app.js, js/d3.v7.min.js, js/dagre.min.js) exist in the source repo but are not packaged into the wheel because there is no [tool.setuptools.package-data] configuration.

Fix

Added [tool.setuptools.package-data] to pyproject.toml to include all static assets:

[tool.setuptools.package-data]
"flowr.static" = ["*.html", "css/**", "js/**"]

Verification

Built the wheel locally — the resulting wheel now correctly includes all 5 static files:

  • flowr/static/index.html
  • flowr/static/css/style.css
  • flowr/static/js/app.js
  • flowr/static/js/d3.v7.min.js
  • flowr/static/js/dagre.min.js

nullhack added 4 commits May 22, 2026 13:43
The serve command requires index.html, css/, and js/ from the static/
directory, but setuptools only includes .py files by default. Add
[tool.setuptools.package-data] so the frontend assets are included in
both the wheel and sdist distributions.
Bump minor version for the static assets fix release.
@nullhack nullhack merged commit 456c87f into main May 22, 2026
7 checks passed
@nullhack nullhack deleted the fix/include-static-assets-in-wheel branch May 22, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant