Skip to content

Preserve split package metadata in sdists - #47

Merged
timkpaine merged 1 commit into
mainfrom
preserve-split-sdist-metadata
Jul 28, 2026
Merged

Preserve split package metadata in sdists#47
timkpaine merged 1 commit into
mainfrom
preserve-split-sdist-metadata

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Description

Split sdists currently rebuild as the base package because Hatchling resolves dynamic dependencies from PKG-INFO and skips metadata hooks. Register an sdist build hook that packages pyproject.toml with the generated split-package name so downstream wheels retain the selected extra and dependency.

Document the required sdist hook configuration and add an end-to-end sdist-to-wheel regression test.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build configuration
  • Other (describe below)

Checklist

  • Linting passes (make lint)
  • Tests pass (make test)
  • New tests added for new functionality
  • Documentation updated (if applicable)
  • Changelog / version bump (not applicable)

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

4 tests  +1   4 ✅ +1   3s ⏱️ -1s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit d8c8ba6. ± Comparison against base commit 43f3660.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.55556% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.15%. Comparing base (43f3660) to head (d8c8ba6).

Files with missing lines Patch % Lines
hatch_multi/plugin.py 28.94% 27 Missing ⚠️
hatch_multi/hooks.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #47       +/-   ##
===========================================
- Coverage   82.20%   72.15%   -10.05%     
===========================================
  Files           7        7               
  Lines         118      176       +58     
===========================================
+ Hits           97      127       +30     
- Misses         21       49       +28     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timkpaine
timkpaine merged commit f729737 into main Jul 28, 2026
2 of 4 checks passed
@timkpaine
timkpaine deleted the preserve-split-sdist-metadata branch July 28, 2026 15:03
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