hatch-cpp 0.1.4__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/PKG-INFO +1 -1
  2. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/__init__.py +1 -1
  3. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/plugin.py +2 -5
  4. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/structs.py +9 -0
  5. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/pyproject.toml +2 -2
  6. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/.gitignore +0 -0
  7. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/LICENSE +0 -0
  8. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/README.md +0 -0
  9. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/hooks.py +0 -0
  10. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_all.py +0 -0
  11. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_basic/cpp/project/basic.cpp +0 -0
  12. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_basic/cpp/project/basic.hpp +0 -0
  13. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_basic/project/__init__.py +0 -0
  14. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_basic/pyproject.toml +0 -0
  15. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_nanobind/cpp/project/basic.cpp +0 -0
  16. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_nanobind/cpp/project/basic.hpp +0 -0
  17. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_nanobind/project/__init__.py +0 -0
  18. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_nanobind/pyproject.toml +0 -0
  19. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_override_classes/cpp/project/basic.cpp +0 -0
  20. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_override_classes/cpp/project/basic.hpp +0 -0
  21. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_override_classes/project/__init__.py +0 -0
  22. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_override_classes/pyproject.toml +0 -0
  23. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_pybind/cpp/project/basic.cpp +0 -0
  24. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_pybind/cpp/project/basic.hpp +0 -0
  25. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_pybind/project/__init__.py +0 -0
  26. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_project_pybind/pyproject.toml +0 -0
  27. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/tests/test_projects.py +0 -0
  28. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/toolchains/__init__.py +0 -0
  29. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/toolchains/cmake.py +0 -0
  30. {hatch_cpp-0.1.4 → hatch_cpp-0.1.5}/hatch_cpp/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hatch-cpp
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Hatch plugin for C++ builds
5
5
  Project-URL: Repository, https://github.com/python-project-templates/hatch-cpp
6
6
  Project-URL: Homepage, https://github.com/python-project-templates/hatch-cpp
@@ -1,4 +1,4 @@
1
- __version__ = "0.1.4"
1
+ __version__ = "0.1.5"
2
2
 
3
3
  from .hooks import hatch_register_build_hook
4
4
  from .plugin import HatchCppBuildHook
@@ -83,8 +83,5 @@ class HatchCppBuildHook(BuildHookInterface[HatchCppBuildConfig]):
83
83
 
84
84
  # force include libraries
85
85
  for library in libraries:
86
- if build_plan.platform.platform == "win32":
87
- suffix = "dll"
88
- else:
89
- suffix = "so"
90
- build_data["force_include"][f"{library.name}.{suffix}"] = f"{library.name}.{suffix}"
86
+ name = library.get_qualified_name(build_plan.platform.platform)
87
+ build_data["force_include"][name] = name
@@ -52,6 +52,15 @@ class HatchCppLibrary(BaseModel):
52
52
  export_symbols: List[str] = Field(default_factory=list, alias="export-symbols")
53
53
  depends: List[str] = Field(default_factory=list)
54
54
 
55
+ def get_qualified_name(self, platform):
56
+ if platform == "win32":
57
+ suffix = "dll" if self.binding == "none" else "pyd"
58
+ elif platform == "darwin" and self.binding == "none":
59
+ suffix = "dylib"
60
+ else:
61
+ suffix = "so"
62
+ return f"{self.name}.{suffix}"
63
+
55
64
 
56
65
  class HatchCppPlatform(BaseModel):
57
66
  cc: str
@@ -8,7 +8,7 @@ authors = [{name = "the hatch-cpp authors", email = "t.paine154@gmail.com"}]
8
8
  description = "Hatch plugin for C++ builds"
9
9
  readme = "README.md"
10
10
  license = { text = "Apache-2.0" }
11
- version = "0.1.4"
11
+ version = "0.1.5"
12
12
  requires-python = ">=3.9"
13
13
  keywords = [
14
14
  "hatch",
@@ -62,7 +62,7 @@ Repository = "https://github.com/python-project-templates/hatch-cpp"
62
62
  Homepage = "https://github.com/python-project-templates/hatch-cpp"
63
63
 
64
64
  [tool.bumpversion]
65
- current_version = "0.1.4"
65
+ current_version = "0.1.5"
66
66
  commit = true
67
67
  tag = false
68
68
 
File without changes
File without changes
File without changes
File without changes
File without changes