hatch-cpp 0.4.1__py3-none-any.whl → 0.4.2__py3-none-any.whl

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.
hatch_cpp/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.4.1"
1
+ __version__ = "0.4.2"
2
2
 
3
3
  from .config import *
4
4
  from .hooks import *
@@ -83,6 +83,10 @@ class TestVcpkgRefConfig:
83
83
  cfg = HatchCppVcpkgConfiguration(vcpkg_ref=sha)
84
84
  assert cfg.vcpkg_ref == sha
85
85
 
86
+ def test_linux_arm64_triplet(self):
87
+ cfg = HatchCppVcpkgConfiguration(vcpkg_triplet="arm64-linux")
88
+ assert cfg.vcpkg_triplet == "arm64-linux"
89
+
86
90
 
87
91
  class TestResolveVcpkgRef:
88
92
  """Tests for _resolve_vcpkg_ref priority logic."""
@@ -163,6 +167,17 @@ class TestVcpkgGenerate:
163
167
  assert "./vcpkg/bootstrap-vcpkg.sh" in commands
164
168
  assert "./vcpkg/vcpkg install --triplet x64-linux" in commands
165
169
 
170
+ def test_generate_detects_linux_arm64_triplet(self, tmp_path, monkeypatch):
171
+ monkeypatch.chdir(tmp_path)
172
+ monkeypatch.setattr("hatch_cpp.toolchains.vcpkg.sys_platform", "linux")
173
+ monkeypatch.setattr("hatch_cpp.toolchains.vcpkg.platform_machine", lambda: "aarch64")
174
+ self._make_vcpkg_env(tmp_path)
175
+
176
+ cfg = HatchCppVcpkgConfiguration()
177
+ commands = cfg.generate(None)
178
+
179
+ assert "./vcpkg/vcpkg install --triplet arm64-linux" in commands
180
+
166
181
  def test_generate_uses_windows_command_paths(self, tmp_path, monkeypatch):
167
182
  monkeypatch.chdir(tmp_path)
168
183
  monkeypatch.setattr("hatch_cpp.toolchains.vcpkg.sys_platform", "win32")
@@ -24,6 +24,7 @@ VcpkgTriplet = Literal[
24
24
  "x86-windows",
25
25
  "arm-neon-android",
26
26
  "arm64-android",
27
+ "arm64-linux",
27
28
  "arm64-osx",
28
29
  "arm64-uwp",
29
30
  "arm64-windows",
@@ -31,7 +32,7 @@ VcpkgTriplet = Literal[
31
32
  ]
32
33
  VcpkgPlatformDefaults = {
33
34
  ("linux", "x86_64"): "x64-linux",
34
- # ("linux", "arm64"): "",
35
+ ("linux", "aarch64"): "arm64-linux",
35
36
  ("darwin", "x86_64"): "x64-osx",
36
37
  ("darwin", "arm64"): "arm64-osx",
37
38
  ("win32", "x86_64"): "x64-windows-static-md",
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: hatch-cpp
3
- Version: 0.4.1
3
+ Version: 0.4.2
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
- hatch_cpp/__init__.py,sha256=obN0qecZxCCF7GZRXEfOmWIF0PaLdpwOFr04l0P5tzw,114
1
+ hatch_cpp/__init__.py,sha256=ijuUPcbEZuigso54HE7ZZ24RetuOte0VViA3Iy8chzw,114
2
2
  hatch_cpp/config.py,sha256=BlLr2hivhlp-1S6aSbJlHPWHtxMGvF0SMR-dJRPXQro,4460
3
3
  hatch_cpp/hooks.py,sha256=OfcAgx6gVL0ukvpyln5OTiwhqxObJ0b4FKr850fYP3I,178
4
4
  hatch_cpp/plugin.py,sha256=8Y4d6FMQocVzoNEWLbryeY1Wr_dUxQ3DJjiQHAjj4zg,4302
@@ -7,7 +7,7 @@ hatch_cpp/tests/test_hatch_build.py,sha256=q2IKTFi3Pq99UsOyL84V-C9VtFUs3ZcA9UlA8
7
7
  hatch_cpp/tests/test_platform_specific.py,sha256=SRKAojh6PkwKZnEj8SjvfFa_Dy8NSKw4R82ol8O1TZs,20126
8
8
  hatch_cpp/tests/test_projects.py,sha256=WAV8OAV-4Xp4o91S1nlj9ptmpexlXEIXnfSozt0mhCI,2123
9
9
  hatch_cpp/tests/test_structs.py,sha256=zmNtAV1bojvJM6gatjDtvqrAeUpKzpfmLrzgFTZLo8U,12028
10
- hatch_cpp/tests/test_vcpkg_ref.py,sha256=1inxhiDD_QQThKe804UZ-SZkh5lcUUWjzb63ATZ9c9Y,10854
10
+ hatch_cpp/tests/test_vcpkg_ref.py,sha256=hiYqLMBwUQQxGrDj4ijPA4jnWLMJUhS7mlm63C2u5qA,11501
11
11
  hatch_cpp/tests/test_project_basic/pyproject.toml,sha256=eqM1UVpNmJWDfsuO18ZG_VOV9I4tAWgsM5Dhf49X8Nc,694
12
12
  hatch_cpp/tests/test_project_basic/cpp/project/basic.cpp,sha256=gQ2nmdLqIdgaqxSKvkN_vbp6Iv_pAoVIHETXPRnALb0,117
13
13
  hatch_cpp/tests/test_project_basic/cpp/project/basic.hpp,sha256=SO5GhPj8k3RzWrfH37lFSDc8w1Vf3yqTUhxmr1hnoko,422
@@ -59,9 +59,9 @@ hatch_cpp/tests/test_project_pybind_vcpkg/project/__init__.py,sha256=47DEQpj8HBS
59
59
  hatch_cpp/toolchains/__init__.py,sha256=anza4tXKxauobWMOUrxX3sEO0qs7sp6VdLXhLae3vkY,64
60
60
  hatch_cpp/toolchains/cmake.py,sha256=9fOGXuJ4bpkKjU789GApK59WS4iZQNQK19Q_Zq_Byb4,3709
61
61
  hatch_cpp/toolchains/common.py,sha256=RoPfzuNCRWoqzpocymS_mhincOZZjKa0WVCLuckZijg,19704
62
- hatch_cpp/toolchains/vcpkg.py,sha256=N9iG9A37VkHRswfq1Fv4WWGxdRQgPB0ALQ1iGyork3w,5410
63
- hatch_cpp-0.4.1.dist-info/METADATA,sha256=Yzq7UrWCdfAM7d0prW2WFzT4bqVKJt_oP4fhdXGYGPw,9838
64
- hatch_cpp-0.4.1.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
65
- hatch_cpp-0.4.1.dist-info/entry_points.txt,sha256=RgXfjpD4iwomJQK5n7FnPkXzb5fOnF5v3DI5hbkgVcw,30
66
- hatch_cpp-0.4.1.dist-info/licenses/LICENSE,sha256=FWyFTpd5xXEz50QpGDtsyIv6dgR2z_dHdoab_Nq_KMw,11452
67
- hatch_cpp-0.4.1.dist-info/RECORD,,
62
+ hatch_cpp/toolchains/vcpkg.py,sha256=k5H5G-MepHyDi9AmiT9g9oRQJJHzR2-DRGS6g_RTXGs,5440
63
+ hatch_cpp-0.4.2.dist-info/METADATA,sha256=LdSecDrBH5KW5IOMPIAS3aQZybUvs7DK-grU2PpEe0g,9838
64
+ hatch_cpp-0.4.2.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
65
+ hatch_cpp-0.4.2.dist-info/entry_points.txt,sha256=RgXfjpD4iwomJQK5n7FnPkXzb5fOnF5v3DI5hbkgVcw,30
66
+ hatch_cpp-0.4.2.dist-info/licenses/LICENSE,sha256=FWyFTpd5xXEz50QpGDtsyIv6dgR2z_dHdoab_Nq_KMw,11452
67
+ hatch_cpp-0.4.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.31.0
2
+ Generator: hatchling 1.32.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any