Skip to content

fix: include LICENSE file in sub-package sdists and wheels#776

Merged
aldbr merged 1 commit into
DIRACGrid:mainfrom
chrisburr:fix/include-license-in-subpackages
Feb 9, 2026
Merged

fix: include LICENSE file in sub-package sdists and wheels#776
aldbr merged 1 commit into
DIRACGrid:mainfrom
chrisburr:fix/include-license-in-subpackages

Conversation

@chrisburr

Copy link
Copy Markdown
Member

Summary

  • Each sub-package (diracx-api/, diracx-core/, etc.) was missing the LICENSE file in published sdists and wheels because hatchling only auto-discovers license files in the package's own directory, not the monorepo root
  • Added [tool.hatch.build.targets.sdist.force-include] to all 8 sub-package pyproject.toml files to pull the root LICENSE into each sdist
  • The wheel (built from the sdist) then auto-discovers the LICENSE and places it in .dist-info/licenses/

@read-the-docs-community

read-the-docs-community Bot commented Feb 9, 2026

Copy link
Copy Markdown

Documentation build overview

📚 diracx | 🛠️ Build #31332045 | 📁 Comparing 9250a74 against latest (4fad58f)


🔍 Preview build

No files changed.

Use hatchling's force-include to pull the root LICENSE into each
sub-package's sdist. The wheel built from the sdist then auto-discovers
the LICENSE and places it in .dist-info/licenses/.
@aldbr
aldbr force-pushed the fix/include-license-in-subpackages branch from 0554d3a to 9250a74 Compare February 9, 2026 12:53

@aldbr aldbr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need the same change for the wheel for completeness?

https://hatch.pypa.io/1.9/config/build/#forced-inclusion

@chrisburr

Copy link
Copy Markdown
Member Author

It isn't needed as it's auto-discovered from the sdist while building the wheel.

@aldbr
aldbr merged commit 9073611 into DIRACGrid:main Feb 9, 2026
29 checks passed
@chrisburr
chrisburr deleted the fix/include-license-in-subpackages branch February 9, 2026 18:51
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.

2 participants