Skip to content

Commit

Permalink
Add support for cmdclass in setuptools plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Dec 3, 2021
1 parent d2f902e commit afba65f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ini2toml/plugins/setuptools_pep621.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def processing_rules(self) -> ProcessingRules:
("metadata", "platforms"): split_list_comma,
# ---
("metadata", "provides"): split_list_comma,
("metadata", "requires"): split_list_comma,
("metadata", "requires"): deprecated("requires", split_list_comma),
("metadata", "obsoletes"): split_list_comma,
# => NOTICE: not supported by pip
# ---- Options ----
Expand All @@ -168,6 +168,7 @@ def processing_rules(self) -> ProcessingRules:
("options", "package-dir"): split_kv_pairs,
("options", "namespace-packages"): split_list_comma,
("options", "py-modules"): split_list_comma,
("options", "cmdclass"): split_kv_pairs,
("options", "data-files"): deprecated("data-files", split_kv_of_lists),
("options", "packages"): directive(
"find", "find_namespace", orelse=split_list_comma
Expand Down
7 changes: 7 additions & 0 deletions tests/plugins/test_setuptools_pep621.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ def test_convert_directives(plugin, parse, convert):
install-requires =
importlib-metadata; python_version<"3.8"
configupdater>=3,<=4
cmdclass =
customcmd = custom_build.CustomCmd
other = custom_build.OtherCmd # Some command
[options.entry-points]
# For example:
console-scripts =
Expand All @@ -131,6 +134,10 @@ def test_convert_directives(plugin, parse, convert):
"configupdater>=3,<=4",
]
[options.cmdclass]
customcmd = "custom_build.CustomCmd"
other = "custom_build.OtherCmd" # Some command
["project:entry-points"]
# For example:
Expand Down

0 comments on commit afba65f

Please sign in to comment.