Skip to content

Commit 47307e2

Browse files
authored
fix: some missing dict-str fields (#37)
* fix: some missing dict-str fields * tests: add a test for entry-point * Update test_package.py
1 parent c6ce706 commit 47307e2

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/dynamic_metadata/info.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
"urls",
3030
"authors",
3131
"maintainers",
32+
"scripts",
33+
"gui-scripts",
34+
"entry-points",
3235
]
3336
)
3437

tests/test_package.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,27 @@ def test_template_needs() -> None:
4848
assert pyproject["requires-python"] == ">=0.1.0"
4949

5050

51+
def test_template_entry_points() -> None:
52+
pyproject = dynamic_metadata.loader.process_dynamic_metadata(
53+
{
54+
"name": "test",
55+
"dynamic": ["version", "entry-points"],
56+
},
57+
{
58+
"version": {
59+
"provider": "dynamic_metadata.plugins.template",
60+
"result": "1.2.3",
61+
},
62+
"entry-points": {
63+
"provider": "dynamic_metadata.plugins.template",
64+
"result": {"my_point": "my_app:script_{project[version]}"},
65+
},
66+
},
67+
)
68+
69+
assert pyproject["entry-points"] == {"my_point": "my_app:script_1.2.3"}
70+
71+
5172
def test_regex() -> None:
5273
pyproject = dynamic_metadata.loader.process_dynamic_metadata(
5374
{

0 commit comments

Comments
 (0)