Skip to content

Commit 9073611

Browse files
authored
fix: include LICENSE file in sub-package sdists and wheels (#776)
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/.
1 parent 4fad58f commit 9073611

8 files changed

Lines changed: 24 additions & 0 deletions

File tree

diracx-api/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ source = "vcs"
3535
[tool.hatch.version.raw-options]
3636
root = ".."
3737

38+
[tool.hatch.build.targets.sdist.force-include]
39+
"../LICENSE" = "LICENSE"
40+
3841
[tool.hatch.build.targets.wheel]
3942
packages = ["src/diracx"]
4043

diracx-cli/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ source = "vcs"
5555
[tool.hatch.version.raw-options]
5656
root = ".."
5757

58+
[tool.hatch.build.targets.sdist.force-include]
59+
"../LICENSE" = "LICENSE"
60+
5861
[tool.hatch.build.targets.wheel]
5962
packages = ["src/diracx"]
6063

diracx-client/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ root = ".."
3232
[tool.hatch.build.targets.wheel]
3333
packages = ["src/diracx"]
3434

35+
[tool.hatch.build.targets.sdist.force-include]
36+
"../LICENSE" = "LICENSE"
37+
3538
[tool.hatch.build.targets.wheel.force-include]
3639
"src/_diracx_client_importer.pth" = "_diracx_client_importer.pth"
3740

diracx-core/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ source = "vcs"
5858
[tool.hatch.version.raw-options]
5959
root = ".."
6060

61+
[tool.hatch.build.targets.sdist.force-include]
62+
"../LICENSE" = "LICENSE"
63+
6164
[tool.hatch.build.targets.wheel]
6265
packages = ["src/diracx"]
6366

diracx-db/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ source = "vcs"
4747
[tool.hatch.version.raw-options]
4848
root = ".."
4949

50+
[tool.hatch.build.targets.sdist.force-include]
51+
"../LICENSE" = "LICENSE"
52+
5053
[tool.hatch.build.targets.wheel]
5154
packages = ["src/diracx"]
5255

diracx-logic/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ source = "vcs"
3939
[tool.hatch.version.raw-options]
4040
root = ".."
4141

42+
[tool.hatch.build.targets.sdist.force-include]
43+
"../LICENSE" = "LICENSE"
44+
4245
[tool.hatch.build.targets.wheel]
4346
packages = ["src/diracx"]
4447

diracx-routers/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ source = "vcs"
6565
[tool.hatch.version.raw-options]
6666
root = ".."
6767

68+
[tool.hatch.build.targets.sdist.force-include]
69+
"../LICENSE" = "LICENSE"
70+
6871
[tool.hatch.build.targets.wheel]
6972
packages = ["src/diracx"]
7073

diracx-testing/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,8 @@ source = "vcs"
4040
[tool.hatch.version.raw-options]
4141
root = ".."
4242

43+
[tool.hatch.build.targets.sdist.force-include]
44+
"../LICENSE" = "LICENSE"
45+
4346
[tool.hatch.build.targets.wheel]
4447
packages = ["src/diracx"]

0 commit comments

Comments
 (0)