Skip to content

Build the source package from an allow-list - #188

Merged
tompollard merged 1 commit into
mainfrom
fix/sdist-allowlist
Oct 20, 2026
Merged

tompollard merged 1 commit into
mainfrom
fix/sdist-allowlist

Conversation

@tompollard

Copy link
Copy Markdown
Member

Summary

The source package (sdist) was built with an exclude list, so any file in the working folder that was not git-ignored was packaged. Building 0.1.6 from a working folder that held local data produced a 24 MB sdist containing a copy of the MIMIC-IV demo, a physionet.org mirror, editor settings, and local deployment notes.

This switches [tool.hatch.build.targets.sdist] to only-include, so the sdist contains only:

  • physionet/
  • tests/ (including the synthetic E4 fixture)
  • LICENSE, README.md, pyproject.toml, requirements.txt

The wheel already listed packages = ["physionet"] and is unchanged.

Note on 0.1.5

The released 0.1.5 sdist on PyPI already includes .claude/settings.local.json, deploy.sh, DEPLOYMENT.md, FEATURE_REQUEST_VALIDATE.md, and PYPI_QUICKSTART.md. I checked them: they contain no credentials (token lines are placeholders such as pypi-YOUR_PRODUCTION_TOKEN_HERE) and no data. No MIMIC data was released.

Verification

  • Built from the same working folder (untracked data folders still present): sdist is 56 KB; listing shows only the paths above plus the .gitignore and PKG-INFO that hatchling adds.
  • Wheel contents unchanged (48 KB, physionet/ only).
  • twine check (twine 7.0) passes for both files.
  • pytest -q: 257 passed, 1 skipped

The sdist used an exclude list, so any file in the working folder that was
not git-ignored was packaged. A local build of 0.1.6 picked up a copy of
the MIMIC-IV demo, a physionet.org mirror, editor settings, and local
deployment notes (24 MB instead of about 50 KB). Released 0.1.5 already
contained several of these local notes and settings files.

List the paths that belong in the sdist instead: the package, tests,
LICENSE, README.md, pyproject.toml, and requirements.txt.
@tompollard
tompollard merged commit 82636b6 into main Oct 20, 2026
2 checks passed
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