fix: copy README.md in Dockerfile for setup.py long_description#792
fix: copy README.md in Dockerfile for setup.py long_description#792vivekchand wants to merge 1 commit intomainfrom
Conversation
a094fc6 to
4119295
Compare
vivekchand
left a comment
There was a problem hiding this comment.
Test plan & review notes
What changed
- Adds
COPY README.md .to the Dockerfile immediately beforepip install -e ., sosetup.pycan openREADME.mdforlong_descriptionwithout aFileNotFoundError.
Smoke commands
docker build -t clawmetry-test .— verify build succeeds without "README.md not found" errordocker run --rm clawmetry-test python -c "import clawmetry"— verify package imports cleanly
Likely failure modes
- COPY order matters:
README.mdmust be copied beforepip install -e .runs (setup.pyopens it at import time). The PR places the new line correctly — above theRUN pip install --no-cache-dir -e .step — so this is fine. - If
README.mdis ever renamed or moved, this line will need updating alongsidesetup.py.
Issue link
- Closes #594 (confirmed in PR body)
Generated by Claude Code
vivekchand
left a comment
There was a problem hiding this comment.
Test plan & review notes
What changed
- Adds
COPY README.md .toDockerfilebeforepip install -e .sosetup.pycan read it forlong_descriptionwithout aFileNotFoundError.
Still relevant?
- No superseding merged PR found for this fix. The
Dockerfilestill hassetup.pyreadingREADME.mdat install time, so the build failure is still live on main without this patch. Relevant and safe to merge.
Smoke commands
python3 dashboard.py --port 8900docker build -t clawmetry-test . && echo "BUILD OK"- Optionally:
docker run --rm clawmetry-test python3 -c "import clawmetry; print('import OK')"
Likely failure modes
- If
README.mdis ever renamed or removed from the repo root, this line will break the build again — the real fix issetup.pyusingopen('README.md', errors='ignore')or a try/except; this PR is the minimal correct fix for now. - No risk of functional regression — single-line, build-only change.
Issue link
- Closes #594
Generated by Claude Code
vivekchand
left a comment
There was a problem hiding this comment.
Test plan & review notes
Repo: vivekchand/clawmetry
What changed
Dockerfile: addsCOPY README.md .beforepip install -e .sosetup.py'slong_descriptionread no longer throwsFileNotFoundError
Smoke commands
docker build -t clawmetry-test . 2>&1 | tail -10— should complete withoutFileNotFoundError: README.mddocker run --rm clawmetry-test python3 -c "import dashboard; print('ok')"— sanity import check
Likely failure modes from the diff
- If
ci.ymlrunspip install -e .outside Docker in a directory that also lacksREADME.md, CI would hit the same error — worth checking whether the CI workflow copies README.md before the install step - No functional regression risk; purely a build fix
Issue link
- Closes #594
Generated by Claude Code
vivekchand
left a comment
There was a problem hiding this comment.
Test plan & review notes
Repo: vivekchand/clawmetry
What changed
- Added
COPY README.md .toDockerfilebeforepip install -e .sosetup.py'slong_description = open("README.md").read()doesn't raiseFileNotFoundErrorduring build.
Smoke commands
docker build -t clawmetry-test .— confirm build succeeds with README presentdocker run --rm clawmetry-test python3 -c "import clawmetry; print('ok')"— verify package installs cleanly
Likely failure modes from the diff
.dockerignoreexcludingREADME.mdwould still cause the build to fail — worth confirmingREADME.mdisn't listed there.- COPY order looks fine:
README.mdis copied beforepip install -e .(line ~25), so no layer-ordering issue. - Single-stage build only, so no concern about multi-stage layer bleed.
Issue link
- Closes #594 (confirmed from PR body)
Generated by Claude Code
Test plan & review notesRepo: vivekchand/clawmetry What changed
Smoke commands
Likely failure modes from the diff
Issue link
Generated by Claude Code |
|
Auto-rebase janitor: the Generated by Claude Code |
Closes #594
What
Fixes Docker build failure caused by setup.py requiring README.md for the long_description field, but the file not being copied into the Docker build context.
Error
Fix
Add
COPY README.md .to the Dockerfile beforepip install -e .runs.Verification