Skip to content

Commit

Permalink
build: add editable to dist type (#764)
Browse files Browse the repository at this point in the history
* build: add `editable` to dist type

Closes #763.

* Merge literals
  • Loading branch information
layday authored Apr 4, 2024
1 parent 1e67c06 commit 9eede71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/build/_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ def build_system_requires(self) -> set[str]:
"""
return set(self._build_system['requires'])

def get_requires_for_build(self, distribution: Distribution, config_settings: ConfigSettings | None = None) -> set[str]:
def get_requires_for_build(
self,
distribution: Distribution,
config_settings: ConfigSettings | None = None,
) -> set[str]:
"""
Return the dependencies defined by the backend in addition to
:attr:`build_system_requires` for a given distribution.
Expand All @@ -220,7 +224,9 @@ def get_requires_for_build(self, distribution: Distribution, config_settings: Co
return set(get_requires(config_settings))

def check_dependencies(
self, distribution: Distribution, config_settings: ConfigSettings | None = None
self,
distribution: Distribution,
config_settings: ConfigSettings | None = None,
) -> set[tuple[str, ...]]:
"""
Return the dependencies which are not satisfied from the combined set of
Expand Down
2 changes: 1 addition & 1 deletion src/build/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


ConfigSettings = typing.Mapping[str, typing.Union[str, typing.Sequence[str]]]
Distribution = typing.Literal['sdist', 'wheel']
Distribution = typing.Literal['sdist', 'wheel', 'editable']
StrPath = typing.Union[str, 'os.PathLike[str]']
SubprocessRunner = typing.Callable[
[typing.Sequence[str], typing.Optional[str], typing.Optional[typing.Mapping[str, str]]], None
Expand Down

0 comments on commit 9eede71

Please sign in to comment.