Skip to content

Commit

Permalink
_build_backend: add build_wheel
Browse files Browse the repository at this point in the history
For direct wheel builds, the frontend code might not get built
otherwise if the build tool decides to create the wheel directly.
  • Loading branch information
yagebu committed Mar 11, 2024
1 parent 3941629 commit 539719b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions _build_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ def _compile_translations() -> None:
write_mo(target.open("wb"), catalog)


def build_wheel( # type: ignore[no-redef]
wheel_directory: str,
config_settings: dict[str, str] | None = None,
metadata_directory: str | None = None,
) -> str:
_compile_frontend()
_compile_translations()
return _build_meta_orig.build_wheel(
wheel_directory,
config_settings=config_settings,
metadata_directory=metadata_directory,
)


def build_sdist( # type: ignore[no-redef]
sdist_directory: str,
config_settings: dict[str, str] | None = None,
Expand Down

0 comments on commit 539719b

Please sign in to comment.