Skip to content

Commit 3af858c

Browse files
authored
Add missing Hatch metadata configuration for direct references (#248)
* Add missing Hatch metadata configuration for direct references - Add `[tool.hatch.metadata] allow-direct-references = true` to both hatch example projects - Update documentation in main README and example READMEs to include the required configuration - This is necessary for Hatchling to handle VCS URLs, local paths, and other direct reference formats supported by UniDep * Add explanatory comments to Hatch configuration sections in README - Add comment explaining allow-direct-references purpose - Add comment explaining the UniDep metadata hook registration
1 parent e599787 commit 3af858c

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,11 @@ dynamic = ["dependencies"]
438438
[tool.hatch]
439439
# Additional Hatch configurations
440440

441+
# Allow VCS URLs, local paths, and other direct references in dependencies
442+
[tool.hatch.metadata]
443+
allow-direct-references = true
444+
445+
# Register UniDep as a metadata hook to process dependencies
441446
[tool.hatch.metadata.hooks.unidep]
442447
```
443448

example/hatch2_project/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ dynamic = ["dependencies"] # add "dependencies" here
2323
[tool.hatch]
2424
# Additional Hatch configurations
2525

26+
[tool.hatch.metadata]
27+
allow-direct-references = true # allow VCS URLs, local paths, etc.
28+
2629
[tool.hatch.metadata.hooks.unidep] # add this to enable the hook
2730

2831
# Specify pip and conda dependencies here

example/hatch2_project/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ version = "0.1.0"
1414

1515
[tool.hatch]
1616

17+
# Allow direct references (e.g., VCS URLs, local paths) in dependencies
18+
[tool.hatch.metadata]
19+
allow-direct-references = true
20+
1721
[tool.hatch.metadata.hooks.unidep]
1822

1923
[tool.unidep]

example/hatch_project/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ dynamic = ["dependencies"] # add "dependencies" here
2323
[tool.hatch]
2424
# Additional Hatch configurations
2525

26+
[tool.hatch.metadata]
27+
allow-direct-references = true # allow VCS URLs, local paths, etc.
28+
2629
[tool.hatch.metadata.hooks.unidep] # add this to enable the hook
2730
```
2831

example/hatch_project/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ version = "0.1.0"
1414

1515
[tool.hatch]
1616

17+
# Allow direct references (e.g., VCS URLs, local paths) in dependencies
18+
[tool.hatch.metadata]
19+
allow-direct-references = true
20+
1721
[tool.hatch.metadata.hooks.unidep]

0 commit comments

Comments
 (0)