Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hatch_cpp/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _wheel_tag(platform: str, machine: str, version_major: int, version_minor: i
return f"cp{version_major}{version_minor}-{abi}-{os_name}_{machine}"


class HatchCppBuildHook(BuildHookInterface[HatchCppBuildConfig]):
class HatchCppBuildHook(BuildHookInterface):
"""The hatch-cpp build hook."""

PLUGIN_NAME = "hatch-cpp"
Expand Down
21 changes: 21 additions & 0 deletions hatch_cpp/tests/test_hook_registration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from hatchling.builders.hooks.plugin.interface import BuildHookInterface

from hatch_cpp.hooks import hatch_register_build_hook


def test_registered_build_hook_accepts_hatchling_configuration(tmp_path):
hook_class = hatch_register_build_hook()
config = {}
hook = hook_class(
root=str(tmp_path),
config=config,
build_config=None,
metadata=None,
directory=str(tmp_path),
target_name="wheel",
)

assert isinstance(hook, BuildHookInterface)
assert hook.PLUGIN_NAME == "hatch-cpp"
assert hook.config is config
assert hook.target_name == "wheel"
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"hatchling",
"hatchling!=1.32.1",
]
build-backend = "hatchling.build"

Expand Down Expand Up @@ -37,7 +37,7 @@ classifiers = [
]

dependencies = [
"hatchling",
"hatchling!=1.32.1",
"hatch-build>=0.5,<0.6",
"pkn",
"pydantic",
Expand All @@ -49,7 +49,7 @@ develop = [
"bump-my-version",
"check-dist",
"codespell",
"hatchling",
"hatchling!=1.32.1",
"hatch-build>=0.3.2",
"mdformat",
"mdformat-tables>=1",
Expand Down