Skip to content

fix(pkg): make lib a real package; clean before local build#109

Merged
martinkersner merged 1 commit into
mainfrom
worktree-packaging-fixes
Jun 30, 2026
Merged

fix(pkg): make lib a real package; clean before local build#109
martinkersner merged 1 commit into
mainfrom
worktree-packaging-fixes

Conversation

@martinkersner

Copy link
Copy Markdown
Member

Summary

Two packaging fixes found while auditing MANIFEST.in.

  • datamaxi/lib/__init__.pylib (heavily imported: datamaxi.lib.utils, datamaxi.lib.constants) had no __init__.py, so it only shipped as an implicit namespace package. Made it an explicit package for robustness.
  • Makefileclean + build targets. build cleans first so a stale build/ dir can't leak removed/phantom modules into a locally-built wheel.

Why

A leftover build/ dir (Apr 2024) caused python -m build --wheel to ship phantom packages (binance/, google/, defillama/, examples/) that no longer exist in source — bdist_wheel zips build/lib, and build_py copies current files in without removing old ones. The sdist was unaffected. CI (release.yml) is safe — it builds on a fresh checkout@v4, so no stale build/ exists; this only bit local builds.

MANIFEST.in itself needs no changes — requirements/common.txt (build-time dep source) is already included and the sdist builds correctly.

Tests

  • pytest -m "not integration": 108 passed, 130 skipped.
  • make build then inspected wheel: 23 correct modules + lib/__init__.py, no phantoms.

Known failures

None.

lib was shipped only as implicit namespace pkg; make explicit.
Add clean+build targets so stale build/ can't leak phantom
modules (binance/google/defillama/examples) into local wheels.
@martinkersner martinkersner self-assigned this Jun 30, 2026
@martinkersner martinkersner merged commit 0b157c9 into main Jun 30, 2026
7 checks passed
@martinkersner martinkersner deleted the worktree-packaging-fixes branch June 30, 2026 06:43
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