Skip to content

Commit

Permalink
Create pyproject.toml:tool if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Sep 25, 2022
1 parent f04343a commit 942245c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/py_build_cmake/pyproject_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ def get_options(config_path: Optional[Path] = None):
project = pyproject.insert(UncheckedConfigOption('project'))
project.insert(UncheckedConfigOption('name', default=RequiredValue()))
name_pth = pth('pyproject.toml/project/name')
tool = pyproject.insert(UncheckedConfigOption("tool"))
tool = pyproject.insert(
UncheckedConfigOption("tool",
default=DefaultValueValue({}),
create_if_inheritance_target_exists=True))
pbc = tool.insert(
ConfigOption("py-build-cmake",
default=DefaultValueValue({}),
Expand Down

0 comments on commit 942245c

Please sign in to comment.