hatch-cpp 0.3.0__py3-none-any.whl → 0.3.1__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 +1 -1
- hatch_cpp/tests/test_platform_specific.py +456 -0
- hatch_cpp/toolchains/common.py +161 -31
- {hatch_cpp-0.3.0.dist-info → hatch_cpp-0.3.1.dist-info}/METADATA +1 -1
- {hatch_cpp-0.3.0.dist-info → hatch_cpp-0.3.1.dist-info}/RECORD +8 -7
- {hatch_cpp-0.3.0.dist-info → hatch_cpp-0.3.1.dist-info}/WHEEL +0 -0
- {hatch_cpp-0.3.0.dist-info → hatch_cpp-0.3.1.dist-info}/entry_points.txt +0 -0
- {hatch_cpp-0.3.0.dist-info → hatch_cpp-0.3.1.dist-info}/licenses/LICENSE +0 -0
hatch_cpp/__init__.py
CHANGED
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
"""Tests for platform-specific library configuration fields."""
|
|
2
|
+
|
|
3
|
+
from hatch_cpp import HatchCppLibrary, HatchCppPlatform
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class TestPlatformSpecificFields:
|
|
7
|
+
"""Test suite for platform-specific field handling in HatchCppLibrary."""
|
|
8
|
+
|
|
9
|
+
def test_effective_include_dirs(self):
|
|
10
|
+
"""Test that include_dirs are properly merged with platform-specific dirs."""
|
|
11
|
+
library = HatchCppLibrary(
|
|
12
|
+
name="test",
|
|
13
|
+
sources=["test.cpp"],
|
|
14
|
+
include_dirs=["common/include"],
|
|
15
|
+
include_dirs_linux=["linux/include"],
|
|
16
|
+
include_dirs_darwin=["darwin/include"],
|
|
17
|
+
include_dirs_win32=["win32/include"],
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
linux_dirs = library.get_effective_include_dirs("linux")
|
|
21
|
+
assert "common/include" in linux_dirs
|
|
22
|
+
assert "linux/include" in linux_dirs
|
|
23
|
+
assert "darwin/include" not in linux_dirs
|
|
24
|
+
assert "win32/include" not in linux_dirs
|
|
25
|
+
|
|
26
|
+
darwin_dirs = library.get_effective_include_dirs("darwin")
|
|
27
|
+
assert "common/include" in darwin_dirs
|
|
28
|
+
assert "darwin/include" in darwin_dirs
|
|
29
|
+
assert "linux/include" not in darwin_dirs
|
|
30
|
+
|
|
31
|
+
win32_dirs = library.get_effective_include_dirs("win32")
|
|
32
|
+
assert "common/include" in win32_dirs
|
|
33
|
+
assert "win32/include" in win32_dirs
|
|
34
|
+
assert "linux/include" not in win32_dirs
|
|
35
|
+
|
|
36
|
+
def test_effective_library_dirs(self):
|
|
37
|
+
"""Test that library_dirs are properly merged with platform-specific dirs."""
|
|
38
|
+
library = HatchCppLibrary(
|
|
39
|
+
name="test",
|
|
40
|
+
sources=["test.cpp"],
|
|
41
|
+
library_dirs=["common/lib"],
|
|
42
|
+
library_dirs_linux=["linux/lib"],
|
|
43
|
+
library_dirs_darwin=["darwin/lib"],
|
|
44
|
+
library_dirs_win32=["win32/lib"],
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
linux_dirs = library.get_effective_library_dirs("linux")
|
|
48
|
+
assert "common/lib" in linux_dirs
|
|
49
|
+
assert "linux/lib" in linux_dirs
|
|
50
|
+
assert "darwin/lib" not in linux_dirs
|
|
51
|
+
|
|
52
|
+
darwin_dirs = library.get_effective_library_dirs("darwin")
|
|
53
|
+
assert "common/lib" in darwin_dirs
|
|
54
|
+
assert "darwin/lib" in darwin_dirs
|
|
55
|
+
|
|
56
|
+
win32_dirs = library.get_effective_library_dirs("win32")
|
|
57
|
+
assert "common/lib" in win32_dirs
|
|
58
|
+
assert "win32/lib" in win32_dirs
|
|
59
|
+
|
|
60
|
+
def test_effective_libraries(self):
|
|
61
|
+
"""Test that libraries are properly merged with platform-specific libraries."""
|
|
62
|
+
library = HatchCppLibrary(
|
|
63
|
+
name="test",
|
|
64
|
+
sources=["test.cpp"],
|
|
65
|
+
libraries=["common"],
|
|
66
|
+
libraries_linux=["pthread", "dl"],
|
|
67
|
+
libraries_darwin=["objc"],
|
|
68
|
+
libraries_win32=["kernel32", "user32"],
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
linux_libs = library.get_effective_libraries("linux")
|
|
72
|
+
assert "common" in linux_libs
|
|
73
|
+
assert "pthread" in linux_libs
|
|
74
|
+
assert "dl" in linux_libs
|
|
75
|
+
assert "objc" not in linux_libs
|
|
76
|
+
|
|
77
|
+
darwin_libs = library.get_effective_libraries("darwin")
|
|
78
|
+
assert "common" in darwin_libs
|
|
79
|
+
assert "objc" in darwin_libs
|
|
80
|
+
assert "pthread" not in darwin_libs
|
|
81
|
+
|
|
82
|
+
win32_libs = library.get_effective_libraries("win32")
|
|
83
|
+
assert "common" in win32_libs
|
|
84
|
+
assert "kernel32" in win32_libs
|
|
85
|
+
assert "user32" in win32_libs
|
|
86
|
+
assert "pthread" not in win32_libs
|
|
87
|
+
|
|
88
|
+
def test_effective_compile_args(self):
|
|
89
|
+
"""Test that extra_compile_args are properly merged with platform-specific args."""
|
|
90
|
+
library = HatchCppLibrary(
|
|
91
|
+
name="test",
|
|
92
|
+
sources=["test.cpp"],
|
|
93
|
+
extra_compile_args=["-O2"],
|
|
94
|
+
extra_compile_args_linux=["-march=native"],
|
|
95
|
+
extra_compile_args_darwin=["-mmacosx-version-min=11"],
|
|
96
|
+
extra_compile_args_win32=["/O2"],
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
linux_args = library.get_effective_compile_args("linux")
|
|
100
|
+
assert "-O2" in linux_args
|
|
101
|
+
assert "-march=native" in linux_args
|
|
102
|
+
assert "-mmacosx-version-min=11" not in linux_args
|
|
103
|
+
|
|
104
|
+
darwin_args = library.get_effective_compile_args("darwin")
|
|
105
|
+
assert "-O2" in darwin_args
|
|
106
|
+
assert "-mmacosx-version-min=11" in darwin_args
|
|
107
|
+
|
|
108
|
+
win32_args = library.get_effective_compile_args("win32")
|
|
109
|
+
assert "-O2" in win32_args
|
|
110
|
+
assert "/O2" in win32_args
|
|
111
|
+
|
|
112
|
+
def test_effective_link_args(self):
|
|
113
|
+
"""Test that extra_link_args are properly merged with platform-specific args."""
|
|
114
|
+
library = HatchCppLibrary(
|
|
115
|
+
name="test",
|
|
116
|
+
sources=["test.cpp"],
|
|
117
|
+
extra_link_args=["-shared"],
|
|
118
|
+
extra_link_args_linux=["-Wl,-rpath,$ORIGIN/lib"],
|
|
119
|
+
extra_link_args_darwin=["-Wl,-rpath,@loader_path/lib"],
|
|
120
|
+
extra_link_args_win32=["/NODEFAULTLIB"],
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
linux_args = library.get_effective_link_args("linux")
|
|
124
|
+
assert "-shared" in linux_args
|
|
125
|
+
assert "-Wl,-rpath,$ORIGIN/lib" in linux_args
|
|
126
|
+
assert "-Wl,-rpath,@loader_path/lib" not in linux_args
|
|
127
|
+
|
|
128
|
+
darwin_args = library.get_effective_link_args("darwin")
|
|
129
|
+
assert "-shared" in darwin_args
|
|
130
|
+
assert "-Wl,-rpath,@loader_path/lib" in darwin_args
|
|
131
|
+
|
|
132
|
+
win32_args = library.get_effective_link_args("win32")
|
|
133
|
+
assert "-shared" in win32_args
|
|
134
|
+
assert "/NODEFAULTLIB" in win32_args
|
|
135
|
+
|
|
136
|
+
def test_effective_extra_objects(self):
|
|
137
|
+
"""Test that extra_objects are properly merged with platform-specific objects."""
|
|
138
|
+
library = HatchCppLibrary(
|
|
139
|
+
name="test",
|
|
140
|
+
sources=["test.cpp"],
|
|
141
|
+
extra_objects=["common.o"],
|
|
142
|
+
extra_objects_linux=["linux.o"],
|
|
143
|
+
extra_objects_darwin=["darwin.o"],
|
|
144
|
+
extra_objects_win32=["win32.obj"],
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
linux_objs = library.get_effective_extra_objects("linux")
|
|
148
|
+
assert "common.o" in linux_objs
|
|
149
|
+
assert "linux.o" in linux_objs
|
|
150
|
+
assert "darwin.o" not in linux_objs
|
|
151
|
+
|
|
152
|
+
darwin_objs = library.get_effective_extra_objects("darwin")
|
|
153
|
+
assert "common.o" in darwin_objs
|
|
154
|
+
assert "darwin.o" in darwin_objs
|
|
155
|
+
|
|
156
|
+
win32_objs = library.get_effective_extra_objects("win32")
|
|
157
|
+
assert "common.o" in win32_objs
|
|
158
|
+
assert "win32.obj" in win32_objs
|
|
159
|
+
|
|
160
|
+
def test_effective_define_macros(self):
|
|
161
|
+
"""Test that define_macros are properly merged with platform-specific macros."""
|
|
162
|
+
library = HatchCppLibrary(
|
|
163
|
+
name="test",
|
|
164
|
+
sources=["test.cpp"],
|
|
165
|
+
define_macros=["COMMON=1"],
|
|
166
|
+
define_macros_linux=["LINUX=1", "_GNU_SOURCE"],
|
|
167
|
+
define_macros_darwin=["DARWIN=1", "__APPLE__"],
|
|
168
|
+
define_macros_win32=["WIN32=1", "_WINDOWS"],
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
linux_macros = library.get_effective_define_macros("linux")
|
|
172
|
+
assert "COMMON=1" in linux_macros
|
|
173
|
+
assert "LINUX=1" in linux_macros
|
|
174
|
+
assert "_GNU_SOURCE" in linux_macros
|
|
175
|
+
assert "DARWIN=1" not in linux_macros
|
|
176
|
+
|
|
177
|
+
darwin_macros = library.get_effective_define_macros("darwin")
|
|
178
|
+
assert "COMMON=1" in darwin_macros
|
|
179
|
+
assert "DARWIN=1" in darwin_macros
|
|
180
|
+
assert "__APPLE__" in darwin_macros
|
|
181
|
+
|
|
182
|
+
win32_macros = library.get_effective_define_macros("win32")
|
|
183
|
+
assert "COMMON=1" in win32_macros
|
|
184
|
+
assert "WIN32=1" in win32_macros
|
|
185
|
+
assert "_WINDOWS" in win32_macros
|
|
186
|
+
|
|
187
|
+
def test_effective_undef_macros(self):
|
|
188
|
+
"""Test that undef_macros are properly merged with platform-specific macros."""
|
|
189
|
+
library = HatchCppLibrary(
|
|
190
|
+
name="test",
|
|
191
|
+
sources=["test.cpp"],
|
|
192
|
+
undef_macros=["COMMON_UNDEF"],
|
|
193
|
+
undef_macros_linux=["LINUX_UNDEF"],
|
|
194
|
+
undef_macros_darwin=["DARWIN_UNDEF"],
|
|
195
|
+
undef_macros_win32=["WIN32_UNDEF"],
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
linux_macros = library.get_effective_undef_macros("linux")
|
|
199
|
+
assert "COMMON_UNDEF" in linux_macros
|
|
200
|
+
assert "LINUX_UNDEF" in linux_macros
|
|
201
|
+
assert "DARWIN_UNDEF" not in linux_macros
|
|
202
|
+
|
|
203
|
+
darwin_macros = library.get_effective_undef_macros("darwin")
|
|
204
|
+
assert "COMMON_UNDEF" in darwin_macros
|
|
205
|
+
assert "DARWIN_UNDEF" in darwin_macros
|
|
206
|
+
|
|
207
|
+
win32_macros = library.get_effective_undef_macros("win32")
|
|
208
|
+
assert "COMMON_UNDEF" in win32_macros
|
|
209
|
+
assert "WIN32_UNDEF" in win32_macros
|
|
210
|
+
|
|
211
|
+
def test_empty_platform_specific_fields(self):
|
|
212
|
+
"""Test that empty platform-specific fields don't cause issues."""
|
|
213
|
+
library = HatchCppLibrary(
|
|
214
|
+
name="test",
|
|
215
|
+
sources=["test.cpp"],
|
|
216
|
+
include_dirs=["common/include"],
|
|
217
|
+
# No platform-specific fields set
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
linux_dirs = library.get_effective_include_dirs("linux")
|
|
221
|
+
assert linux_dirs == ["common/include"]
|
|
222
|
+
|
|
223
|
+
darwin_dirs = library.get_effective_include_dirs("darwin")
|
|
224
|
+
assert darwin_dirs == ["common/include"]
|
|
225
|
+
|
|
226
|
+
win32_dirs = library.get_effective_include_dirs("win32")
|
|
227
|
+
assert win32_dirs == ["common/include"]
|
|
228
|
+
|
|
229
|
+
def test_only_platform_specific_fields(self):
|
|
230
|
+
"""Test that only platform-specific fields work without common fields."""
|
|
231
|
+
library = HatchCppLibrary(
|
|
232
|
+
name="test",
|
|
233
|
+
sources=["test.cpp"],
|
|
234
|
+
# No common include_dirs
|
|
235
|
+
include_dirs_linux=["linux/include"],
|
|
236
|
+
include_dirs_darwin=["darwin/include"],
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
linux_dirs = library.get_effective_include_dirs("linux")
|
|
240
|
+
assert linux_dirs == ["linux/include"]
|
|
241
|
+
|
|
242
|
+
darwin_dirs = library.get_effective_include_dirs("darwin")
|
|
243
|
+
assert darwin_dirs == ["darwin/include"]
|
|
244
|
+
|
|
245
|
+
win32_dirs = library.get_effective_include_dirs("win32")
|
|
246
|
+
assert win32_dirs == []
|
|
247
|
+
|
|
248
|
+
def test_alias_hyphenated_names(self):
|
|
249
|
+
"""Test that hyphenated field names work as aliases."""
|
|
250
|
+
library = HatchCppLibrary(
|
|
251
|
+
name="test",
|
|
252
|
+
sources=["test.cpp"],
|
|
253
|
+
**{
|
|
254
|
+
"include-dirs": ["common/include"],
|
|
255
|
+
"include-dirs-linux": ["linux/include"],
|
|
256
|
+
"library-dirs-darwin": ["darwin/lib"],
|
|
257
|
+
"extra-compile-args-win32": ["/O2"],
|
|
258
|
+
"extra-link-args-linux": ["-Wl,-rpath,$ORIGIN"],
|
|
259
|
+
"define-macros-darwin": ["DARWIN=1"],
|
|
260
|
+
"undef-macros-win32": ["NDEBUG"],
|
|
261
|
+
},
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
assert library.include_dirs == ["common/include"]
|
|
265
|
+
assert library.include_dirs_linux == ["linux/include"]
|
|
266
|
+
assert library.library_dirs_darwin == ["darwin/lib"]
|
|
267
|
+
assert library.extra_compile_args_win32 == ["/O2"]
|
|
268
|
+
assert library.extra_link_args_linux == ["-Wl,-rpath,$ORIGIN"]
|
|
269
|
+
assert library.define_macros_darwin == ["DARWIN=1"]
|
|
270
|
+
assert library.undef_macros_win32 == ["NDEBUG"]
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
class TestPlatformFlagsIntegration:
|
|
274
|
+
"""Integration tests for platform-specific fields in compile/link flags."""
|
|
275
|
+
|
|
276
|
+
def test_compile_flags_include_platform_specific_include_dirs(self):
|
|
277
|
+
"""Test that get_compile_flags includes platform-specific include dirs."""
|
|
278
|
+
library = HatchCppLibrary(
|
|
279
|
+
name="test",
|
|
280
|
+
sources=["test.cpp"],
|
|
281
|
+
binding="generic",
|
|
282
|
+
include_dirs=["common/include"],
|
|
283
|
+
include_dirs_linux=["linux/include"],
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
# Create a mock linux platform
|
|
287
|
+
platform = HatchCppPlatform(cc="gcc", cxx="g++", ld="ld", platform="linux", toolchain="gcc", disable_ccache=True)
|
|
288
|
+
|
|
289
|
+
flags = platform.get_compile_flags(library)
|
|
290
|
+
assert "-Icommon/include" in flags
|
|
291
|
+
assert "-Ilinux/include" in flags
|
|
292
|
+
|
|
293
|
+
def test_compile_flags_include_platform_specific_macros(self):
|
|
294
|
+
"""Test that get_compile_flags includes platform-specific define/undef macros."""
|
|
295
|
+
library = HatchCppLibrary(
|
|
296
|
+
name="test",
|
|
297
|
+
sources=["test.cpp"],
|
|
298
|
+
binding="generic",
|
|
299
|
+
define_macros=["COMMON=1"],
|
|
300
|
+
define_macros_linux=["LINUX_SPECIFIC=1"],
|
|
301
|
+
undef_macros=["OLD_MACRO"],
|
|
302
|
+
undef_macros_linux=["LINUX_OLD"],
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
platform = HatchCppPlatform(cc="gcc", cxx="g++", ld="ld", platform="linux", toolchain="gcc", disable_ccache=True)
|
|
306
|
+
|
|
307
|
+
flags = platform.get_compile_flags(library)
|
|
308
|
+
assert "-DCOMMON=1" in flags
|
|
309
|
+
assert "-DLINUX_SPECIFIC=1" in flags
|
|
310
|
+
assert "-UOLD_MACRO" in flags
|
|
311
|
+
assert "-ULINUX_OLD" in flags
|
|
312
|
+
|
|
313
|
+
def test_link_flags_include_platform_specific_libraries(self):
|
|
314
|
+
"""Test that get_link_flags includes platform-specific libraries."""
|
|
315
|
+
library = HatchCppLibrary(
|
|
316
|
+
name="test",
|
|
317
|
+
sources=["test.cpp"],
|
|
318
|
+
binding="generic",
|
|
319
|
+
libraries=["common"],
|
|
320
|
+
libraries_linux=["pthread", "dl"],
|
|
321
|
+
library_dirs=["common/lib"],
|
|
322
|
+
library_dirs_linux=["linux/lib"],
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
platform = HatchCppPlatform(cc="gcc", cxx="g++", ld="ld", platform="linux", toolchain="gcc", disable_ccache=True)
|
|
326
|
+
|
|
327
|
+
flags = platform.get_link_flags(library)
|
|
328
|
+
assert "-lcommon" in flags
|
|
329
|
+
assert "-lpthread" in flags
|
|
330
|
+
assert "-ldl" in flags
|
|
331
|
+
assert "-Lcommon/lib" in flags
|
|
332
|
+
assert "-Llinux/lib" in flags
|
|
333
|
+
|
|
334
|
+
def test_link_flags_include_platform_specific_link_args(self):
|
|
335
|
+
"""Test that get_link_flags includes platform-specific extra_link_args."""
|
|
336
|
+
library = HatchCppLibrary(
|
|
337
|
+
name="test",
|
|
338
|
+
sources=["test.cpp"],
|
|
339
|
+
binding="generic",
|
|
340
|
+
extra_link_args=["-shared"],
|
|
341
|
+
extra_link_args_linux=["-Wl,-rpath,$ORIGIN/lib"],
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
platform = HatchCppPlatform(cc="gcc", cxx="g++", ld="ld", platform="linux", toolchain="gcc", disable_ccache=True)
|
|
345
|
+
|
|
346
|
+
flags = platform.get_link_flags(library)
|
|
347
|
+
assert "-shared" in flags
|
|
348
|
+
assert "-Wl,-rpath,$ORIGIN/lib" in flags
|
|
349
|
+
|
|
350
|
+
def test_darwin_platform_uses_darwin_specific_fields(self):
|
|
351
|
+
"""Test that darwin platform uses darwin-specific fields."""
|
|
352
|
+
library = HatchCppLibrary(
|
|
353
|
+
name="test",
|
|
354
|
+
sources=["test.cpp"],
|
|
355
|
+
binding="generic",
|
|
356
|
+
libraries_linux=["pthread"],
|
|
357
|
+
libraries_darwin=["objc"],
|
|
358
|
+
extra_link_args_darwin=["-Wl,-rpath,@loader_path/lib"],
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
platform = HatchCppPlatform(cc="clang", cxx="clang++", ld="ld", platform="darwin", toolchain="clang", disable_ccache=True)
|
|
362
|
+
|
|
363
|
+
flags = platform.get_link_flags(library)
|
|
364
|
+
assert "-lobjc" in flags
|
|
365
|
+
assert "-lpthread" not in flags
|
|
366
|
+
assert "-Wl,-rpath,@loader_path/lib" in flags
|
|
367
|
+
|
|
368
|
+
def test_win32_platform_uses_win32_specific_fields(self):
|
|
369
|
+
"""Test that win32 platform uses win32-specific fields."""
|
|
370
|
+
library = HatchCppLibrary(
|
|
371
|
+
name="test",
|
|
372
|
+
sources=["test.cpp"],
|
|
373
|
+
binding="generic",
|
|
374
|
+
libraries=["common"],
|
|
375
|
+
libraries_win32=["kernel32"],
|
|
376
|
+
library_dirs=["common/lib"],
|
|
377
|
+
library_dirs_win32=["win32/lib"],
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
platform = HatchCppPlatform(cc="cl", cxx="cl", ld="link", platform="win32", toolchain="msvc", disable_ccache=True)
|
|
381
|
+
|
|
382
|
+
flags = platform.get_link_flags(library)
|
|
383
|
+
assert "common.lib" in flags
|
|
384
|
+
assert "kernel32.lib" in flags
|
|
385
|
+
assert "/LIBPATH:common/lib" in flags
|
|
386
|
+
assert "/LIBPATH:win32/lib" in flags
|
|
387
|
+
|
|
388
|
+
def test_msvc_compile_flags_use_platform_specific_fields(self):
|
|
389
|
+
"""Test that MSVC compile flags include platform-specific fields."""
|
|
390
|
+
library = HatchCppLibrary(
|
|
391
|
+
name="test",
|
|
392
|
+
sources=["test.cpp"],
|
|
393
|
+
binding="generic",
|
|
394
|
+
include_dirs=["common/include"],
|
|
395
|
+
include_dirs_win32=["win32/include"],
|
|
396
|
+
define_macros=["COMMON=1"],
|
|
397
|
+
define_macros_win32=["_WINDOWS"],
|
|
398
|
+
extra_compile_args_win32=["/W4"],
|
|
399
|
+
)
|
|
400
|
+
|
|
401
|
+
platform = HatchCppPlatform(cc="cl", cxx="cl", ld="link", platform="win32", toolchain="msvc", disable_ccache=True)
|
|
402
|
+
|
|
403
|
+
flags = platform.get_compile_flags(library)
|
|
404
|
+
assert "/Icommon/include" in flags
|
|
405
|
+
assert "/Iwin32/include" in flags
|
|
406
|
+
assert "/DCOMMON=1" in flags
|
|
407
|
+
assert "/D_WINDOWS" in flags
|
|
408
|
+
assert "/W4" in flags
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
class TestPlatformFieldOrdering:
|
|
412
|
+
"""Test that platform-specific fields are appended after common fields."""
|
|
413
|
+
|
|
414
|
+
def test_include_dirs_ordering(self):
|
|
415
|
+
"""Test that platform-specific include dirs come after common dirs."""
|
|
416
|
+
library = HatchCppLibrary(
|
|
417
|
+
name="test",
|
|
418
|
+
sources=["test.cpp"],
|
|
419
|
+
include_dirs=["first", "second"],
|
|
420
|
+
include_dirs_linux=["third", "fourth"],
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
dirs = library.get_effective_include_dirs("linux")
|
|
424
|
+
assert dirs == ["first", "second", "third", "fourth"]
|
|
425
|
+
|
|
426
|
+
def test_libraries_ordering(self):
|
|
427
|
+
"""Test that platform-specific libraries come after common libraries."""
|
|
428
|
+
library = HatchCppLibrary(
|
|
429
|
+
name="test",
|
|
430
|
+
sources=["test.cpp"],
|
|
431
|
+
libraries=["common1", "common2"],
|
|
432
|
+
libraries_linux=["linux1", "linux2"],
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
libs = library.get_effective_libraries("linux")
|
|
436
|
+
assert libs == ["common1", "common2", "linux1", "linux2"]
|
|
437
|
+
|
|
438
|
+
def test_base_list_not_mutated(self):
|
|
439
|
+
"""Test that the base lists are not mutated when getting effective values."""
|
|
440
|
+
library = HatchCppLibrary(
|
|
441
|
+
name="test",
|
|
442
|
+
sources=["test.cpp"],
|
|
443
|
+
include_dirs=["common"],
|
|
444
|
+
include_dirs_linux=["linux"],
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
# Get effective dirs multiple times
|
|
448
|
+
dirs1 = library.get_effective_include_dirs("linux")
|
|
449
|
+
dirs2 = library.get_effective_include_dirs("linux")
|
|
450
|
+
|
|
451
|
+
# Both should be equal
|
|
452
|
+
assert dirs1 == dirs2
|
|
453
|
+
|
|
454
|
+
# Base list should not be modified
|
|
455
|
+
assert library.include_dirs == ["common"]
|
|
456
|
+
assert library.include_dirs_linux == ["linux"]
|
hatch_cpp/toolchains/common.py
CHANGED
|
@@ -47,15 +47,44 @@ class HatchCppLibrary(BaseModel, validate_assignment=True):
|
|
|
47
47
|
std: Optional[str] = None
|
|
48
48
|
|
|
49
49
|
include_dirs: List[str] = Field(default_factory=list, alias=AliasChoices("include_dirs", "include-dirs"))
|
|
50
|
+
include_dirs_linux: List[str] = Field(default_factory=list, alias=AliasChoices("include_dirs_linux", "include-dirs-linux"))
|
|
51
|
+
include_dirs_darwin: List[str] = Field(default_factory=list, alias=AliasChoices("include_dirs_darwin", "include-dirs-darwin"))
|
|
52
|
+
include_dirs_win32: List[str] = Field(default_factory=list, alias=AliasChoices("include_dirs_win32", "include-dirs-win32"))
|
|
53
|
+
|
|
50
54
|
library_dirs: List[str] = Field(default_factory=list, alias=AliasChoices("library_dirs", "library-dirs"))
|
|
55
|
+
library_dirs_linux: List[str] = Field(default_factory=list, alias=AliasChoices("library_dirs_linux", "library-dirs-linux"))
|
|
56
|
+
library_dirs_darwin: List[str] = Field(default_factory=list, alias=AliasChoices("library_dirs_darwin", "library-dirs-darwin"))
|
|
57
|
+
library_dirs_win32: List[str] = Field(default_factory=list, alias=AliasChoices("library_dirs_win32", "library-dirs-win32"))
|
|
58
|
+
|
|
51
59
|
libraries: List[str] = Field(default_factory=list)
|
|
60
|
+
libraries_linux: List[str] = Field(default_factory=list, alias=AliasChoices("libraries_linux", "libraries-linux"))
|
|
61
|
+
libraries_darwin: List[str] = Field(default_factory=list, alias=AliasChoices("libraries_darwin", "libraries-darwin"))
|
|
62
|
+
libraries_win32: List[str] = Field(default_factory=list, alias=AliasChoices("libraries_win32", "libraries-win32"))
|
|
52
63
|
|
|
53
64
|
extra_compile_args: List[str] = Field(default_factory=list, alias=AliasChoices("extra_compile_args", "extra-compile-args"))
|
|
65
|
+
extra_compile_args_linux: List[str] = Field(default_factory=list, alias=AliasChoices("extra_compile_args_linux", "extra-compile-args-linux"))
|
|
66
|
+
extra_compile_args_darwin: List[str] = Field(default_factory=list, alias=AliasChoices("extra_compile_args_darwin", "extra-compile-args-darwin"))
|
|
67
|
+
extra_compile_args_win32: List[str] = Field(default_factory=list, alias=AliasChoices("extra_compile_args_win32", "extra-compile-args-win32"))
|
|
68
|
+
|
|
54
69
|
extra_link_args: List[str] = Field(default_factory=list, alias=AliasChoices("extra_link_args", "extra-link-args"))
|
|
70
|
+
extra_link_args_linux: List[str] = Field(default_factory=list, alias=AliasChoices("extra_link_args_linux", "extra-link-args-linux"))
|
|
71
|
+
extra_link_args_darwin: List[str] = Field(default_factory=list, alias=AliasChoices("extra_link_args_darwin", "extra-link-args-darwin"))
|
|
72
|
+
extra_link_args_win32: List[str] = Field(default_factory=list, alias=AliasChoices("extra_link_args_win32", "extra-link-args-win32"))
|
|
73
|
+
|
|
55
74
|
extra_objects: List[str] = Field(default_factory=list, alias=AliasChoices("extra_objects", "extra-objects"))
|
|
75
|
+
extra_objects_linux: List[str] = Field(default_factory=list, alias=AliasChoices("extra_objects_linux", "extra-objects-linux"))
|
|
76
|
+
extra_objects_darwin: List[str] = Field(default_factory=list, alias=AliasChoices("extra_objects_darwin", "extra-objects-darwin"))
|
|
77
|
+
extra_objects_win32: List[str] = Field(default_factory=list, alias=AliasChoices("extra_objects_win32", "extra-objects-win32"))
|
|
56
78
|
|
|
57
79
|
define_macros: List[str] = Field(default_factory=list, alias=AliasChoices("define_macros", "define-macros"))
|
|
80
|
+
define_macros_linux: List[str] = Field(default_factory=list, alias=AliasChoices("define_macros_linux", "define-macros-linux"))
|
|
81
|
+
define_macros_darwin: List[str] = Field(default_factory=list, alias=AliasChoices("define_macros_darwin", "define-macros-darwin"))
|
|
82
|
+
define_macros_win32: List[str] = Field(default_factory=list, alias=AliasChoices("define_macros_win32", "define-macros-win32"))
|
|
83
|
+
|
|
58
84
|
undef_macros: List[str] = Field(default_factory=list, alias=AliasChoices("undef_macros", "undef-macros"))
|
|
85
|
+
undef_macros_linux: List[str] = Field(default_factory=list, alias=AliasChoices("undef_macros_linux", "undef-macros-linux"))
|
|
86
|
+
undef_macros_darwin: List[str] = Field(default_factory=list, alias=AliasChoices("undef_macros_darwin", "undef-macros-darwin"))
|
|
87
|
+
undef_macros_win32: List[str] = Field(default_factory=list, alias=AliasChoices("undef_macros_win32", "undef-macros-win32"))
|
|
59
88
|
|
|
60
89
|
export_symbols: List[str] = Field(default_factory=list, alias=AliasChoices("export_symbols", "export-symbols"))
|
|
61
90
|
depends: List[str] = Field(default_factory=list)
|
|
@@ -89,6 +118,94 @@ class HatchCppLibrary(BaseModel, validate_assignment=True):
|
|
|
89
118
|
raise ValueError("Generic binding can not support Py_LIMITED_API")
|
|
90
119
|
return self
|
|
91
120
|
|
|
121
|
+
def get_effective_link_args(self, platform: Platform) -> List[str]:
|
|
122
|
+
"""Get link args merged with platform-specific link args."""
|
|
123
|
+
args = list(self.extra_link_args)
|
|
124
|
+
if platform == "linux":
|
|
125
|
+
args.extend(self.extra_link_args_linux)
|
|
126
|
+
elif platform == "darwin":
|
|
127
|
+
args.extend(self.extra_link_args_darwin)
|
|
128
|
+
elif platform == "win32":
|
|
129
|
+
args.extend(self.extra_link_args_win32)
|
|
130
|
+
return args
|
|
131
|
+
|
|
132
|
+
def get_effective_include_dirs(self, platform: Platform) -> List[str]:
|
|
133
|
+
"""Get include dirs merged with platform-specific include dirs."""
|
|
134
|
+
dirs = list(self.include_dirs)
|
|
135
|
+
if platform == "linux":
|
|
136
|
+
dirs.extend(self.include_dirs_linux)
|
|
137
|
+
elif platform == "darwin":
|
|
138
|
+
dirs.extend(self.include_dirs_darwin)
|
|
139
|
+
elif platform == "win32":
|
|
140
|
+
dirs.extend(self.include_dirs_win32)
|
|
141
|
+
return dirs
|
|
142
|
+
|
|
143
|
+
def get_effective_library_dirs(self, platform: Platform) -> List[str]:
|
|
144
|
+
"""Get library dirs merged with platform-specific library dirs."""
|
|
145
|
+
dirs = list(self.library_dirs)
|
|
146
|
+
if platform == "linux":
|
|
147
|
+
dirs.extend(self.library_dirs_linux)
|
|
148
|
+
elif platform == "darwin":
|
|
149
|
+
dirs.extend(self.library_dirs_darwin)
|
|
150
|
+
elif platform == "win32":
|
|
151
|
+
dirs.extend(self.library_dirs_win32)
|
|
152
|
+
return dirs
|
|
153
|
+
|
|
154
|
+
def get_effective_libraries(self, platform: Platform) -> List[str]:
|
|
155
|
+
"""Get libraries merged with platform-specific libraries."""
|
|
156
|
+
libs = list(self.libraries)
|
|
157
|
+
if platform == "linux":
|
|
158
|
+
libs.extend(self.libraries_linux)
|
|
159
|
+
elif platform == "darwin":
|
|
160
|
+
libs.extend(self.libraries_darwin)
|
|
161
|
+
elif platform == "win32":
|
|
162
|
+
libs.extend(self.libraries_win32)
|
|
163
|
+
return libs
|
|
164
|
+
|
|
165
|
+
def get_effective_compile_args(self, platform: Platform) -> List[str]:
|
|
166
|
+
"""Get compile args merged with platform-specific compile args."""
|
|
167
|
+
args = list(self.extra_compile_args)
|
|
168
|
+
if platform == "linux":
|
|
169
|
+
args.extend(self.extra_compile_args_linux)
|
|
170
|
+
elif platform == "darwin":
|
|
171
|
+
args.extend(self.extra_compile_args_darwin)
|
|
172
|
+
elif platform == "win32":
|
|
173
|
+
args.extend(self.extra_compile_args_win32)
|
|
174
|
+
return args
|
|
175
|
+
|
|
176
|
+
def get_effective_extra_objects(self, platform: Platform) -> List[str]:
|
|
177
|
+
"""Get extra objects merged with platform-specific extra objects."""
|
|
178
|
+
objs = list(self.extra_objects)
|
|
179
|
+
if platform == "linux":
|
|
180
|
+
objs.extend(self.extra_objects_linux)
|
|
181
|
+
elif platform == "darwin":
|
|
182
|
+
objs.extend(self.extra_objects_darwin)
|
|
183
|
+
elif platform == "win32":
|
|
184
|
+
objs.extend(self.extra_objects_win32)
|
|
185
|
+
return objs
|
|
186
|
+
|
|
187
|
+
def get_effective_define_macros(self, platform: Platform) -> List[str]:
|
|
188
|
+
"""Get define macros merged with platform-specific define macros."""
|
|
189
|
+
macros = list(self.define_macros)
|
|
190
|
+
if platform == "linux":
|
|
191
|
+
macros.extend(self.define_macros_linux)
|
|
192
|
+
elif platform == "darwin":
|
|
193
|
+
macros.extend(self.define_macros_darwin)
|
|
194
|
+
elif platform == "win32":
|
|
195
|
+
macros.extend(self.define_macros_win32)
|
|
196
|
+
return macros
|
|
197
|
+
|
|
198
|
+
def get_effective_undef_macros(self, platform: Platform) -> List[str]:
|
|
199
|
+
"""Get undef macros merged with platform-specific undef macros."""
|
|
200
|
+
macros = list(self.undef_macros)
|
|
201
|
+
if platform == "linux":
|
|
202
|
+
macros.extend(self.undef_macros_linux)
|
|
203
|
+
elif platform == "darwin":
|
|
204
|
+
macros.extend(self.undef_macros_darwin)
|
|
205
|
+
elif platform == "win32":
|
|
206
|
+
macros.extend(self.undef_macros_win32)
|
|
207
|
+
return macros
|
|
208
|
+
|
|
92
209
|
|
|
93
210
|
class HatchCppPlatform(BaseModel):
|
|
94
211
|
cc: str
|
|
@@ -148,54 +265,62 @@ class HatchCppPlatform(BaseModel):
|
|
|
148
265
|
def get_compile_flags(self, library: HatchCppLibrary, build_type: BuildType = "release") -> str:
|
|
149
266
|
flags = ""
|
|
150
267
|
|
|
268
|
+
# Get effective platform-specific values
|
|
269
|
+
effective_include_dirs = library.get_effective_include_dirs(self.platform)
|
|
270
|
+
effective_compile_args = library.get_effective_compile_args(self.platform)
|
|
271
|
+
effective_define_macros = library.get_effective_define_macros(self.platform)
|
|
272
|
+
effective_undef_macros = library.get_effective_undef_macros(self.platform)
|
|
273
|
+
effective_extra_objects = library.get_effective_extra_objects(self.platform)
|
|
274
|
+
effective_link_args = library.get_effective_link_args(self.platform)
|
|
275
|
+
|
|
151
276
|
# Python.h
|
|
152
277
|
if library.binding != "generic":
|
|
153
|
-
|
|
278
|
+
effective_include_dirs.append(get_path("include"))
|
|
154
279
|
|
|
155
280
|
if library.binding == "pybind11":
|
|
156
281
|
import pybind11
|
|
157
282
|
|
|
158
|
-
|
|
283
|
+
effective_include_dirs.append(pybind11.get_include())
|
|
159
284
|
if not library.std:
|
|
160
285
|
library.std = "c++11"
|
|
161
286
|
elif library.binding == "nanobind":
|
|
162
287
|
import nanobind
|
|
163
288
|
|
|
164
|
-
|
|
289
|
+
effective_include_dirs.append(nanobind.include_dir())
|
|
165
290
|
if not library.std:
|
|
166
291
|
library.std = "c++17"
|
|
167
292
|
library.sources.append(str(Path(nanobind.include_dir()).parent / "src" / "nb_combined.cpp"))
|
|
168
|
-
|
|
293
|
+
effective_include_dirs.append(str((Path(nanobind.include_dir()).parent / "ext" / "robin_map" / "include")))
|
|
169
294
|
|
|
170
295
|
if library.py_limited_api:
|
|
171
296
|
if library.binding == "pybind11":
|
|
172
297
|
raise ValueError("pybind11 does not support Py_LIMITED_API")
|
|
173
|
-
|
|
298
|
+
effective_define_macros.append(f"Py_LIMITED_API=0x0{library.py_limited_api[2]}0{hex(int(library.py_limited_api[3:]))[2:]}00f0")
|
|
174
299
|
|
|
175
300
|
# Toolchain-specific flags
|
|
176
301
|
if self.toolchain == "gcc":
|
|
177
|
-
flags += " " + " ".join(f"-I{d}" for d in
|
|
302
|
+
flags += " " + " ".join(f"-I{d}" for d in effective_include_dirs)
|
|
178
303
|
flags += " -fPIC"
|
|
179
|
-
flags += " " + " ".join(
|
|
180
|
-
flags += " " + " ".join(f"-D{macro}" for macro in
|
|
181
|
-
flags += " " + " ".join(f"-U{macro}" for macro in
|
|
304
|
+
flags += " " + " ".join(effective_compile_args)
|
|
305
|
+
flags += " " + " ".join(f"-D{macro}" for macro in effective_define_macros)
|
|
306
|
+
flags += " " + " ".join(f"-U{macro}" for macro in effective_undef_macros)
|
|
182
307
|
if library.std:
|
|
183
308
|
flags += f" -std={library.std}"
|
|
184
309
|
elif self.toolchain == "clang":
|
|
185
|
-
flags += " ".join(f"-I{d}" for d in
|
|
310
|
+
flags += " ".join(f"-I{d}" for d in effective_include_dirs)
|
|
186
311
|
flags += " -fPIC"
|
|
187
|
-
flags += " " + " ".join(
|
|
188
|
-
flags += " " + " ".join(f"-D{macro}" for macro in
|
|
189
|
-
flags += " " + " ".join(f"-U{macro}" for macro in
|
|
312
|
+
flags += " " + " ".join(effective_compile_args)
|
|
313
|
+
flags += " " + " ".join(f"-D{macro}" for macro in effective_define_macros)
|
|
314
|
+
flags += " " + " ".join(f"-U{macro}" for macro in effective_undef_macros)
|
|
190
315
|
if library.std:
|
|
191
316
|
flags += f" -std={library.std}"
|
|
192
317
|
elif self.toolchain == "msvc":
|
|
193
|
-
flags += " ".join(f"/I{d}" for d in
|
|
194
|
-
flags += " " + " ".join(
|
|
195
|
-
flags += " " + " ".join(
|
|
196
|
-
flags += " " + " ".join(
|
|
197
|
-
flags += " " + " ".join(f"/D{macro}" for macro in
|
|
198
|
-
flags += " " + " ".join(f"/U{macro}" for macro in
|
|
318
|
+
flags += " ".join(f"/I{d}" for d in effective_include_dirs)
|
|
319
|
+
flags += " " + " ".join(effective_compile_args)
|
|
320
|
+
flags += " " + " ".join(effective_link_args)
|
|
321
|
+
flags += " " + " ".join(effective_extra_objects)
|
|
322
|
+
flags += " " + " ".join(f"/D{macro}" for macro in effective_define_macros)
|
|
323
|
+
flags += " " + " ".join(f"/U{macro}" for macro in effective_undef_macros)
|
|
199
324
|
flags += " /EHsc /DWIN32"
|
|
200
325
|
if library.std:
|
|
201
326
|
flags += f" /std:{library.std}"
|
|
@@ -206,12 +331,17 @@ class HatchCppPlatform(BaseModel):
|
|
|
206
331
|
|
|
207
332
|
def get_link_flags(self, library: HatchCppLibrary, build_type: BuildType = "release") -> str:
|
|
208
333
|
flags = ""
|
|
334
|
+
effective_link_args = library.get_effective_link_args(self.platform)
|
|
335
|
+
effective_extra_objects = library.get_effective_extra_objects(self.platform)
|
|
336
|
+
effective_libraries = library.get_effective_libraries(self.platform)
|
|
337
|
+
effective_library_dirs = library.get_effective_library_dirs(self.platform)
|
|
338
|
+
|
|
209
339
|
if self.toolchain == "gcc":
|
|
210
340
|
flags += " -shared"
|
|
211
|
-
flags += " " + " ".join(
|
|
212
|
-
flags += " " + " ".join(
|
|
213
|
-
flags += " " + " ".join(f"-l{lib}" for lib in
|
|
214
|
-
flags += " " + " ".join(f"-L{lib}" for lib in
|
|
341
|
+
flags += " " + " ".join(effective_link_args)
|
|
342
|
+
flags += " " + " ".join(effective_extra_objects)
|
|
343
|
+
flags += " " + " ".join(f"-l{lib}" for lib in effective_libraries)
|
|
344
|
+
flags += " " + " ".join(f"-L{lib}" for lib in effective_library_dirs)
|
|
215
345
|
flags += f" -o {library.get_qualified_name(self.platform)}"
|
|
216
346
|
if self.platform == "darwin":
|
|
217
347
|
flags += " -undefined dynamic_lookup"
|
|
@@ -221,10 +351,10 @@ class HatchCppPlatform(BaseModel):
|
|
|
221
351
|
flags += " -fuse-ld=lld"
|
|
222
352
|
elif self.toolchain == "clang":
|
|
223
353
|
flags += " -shared"
|
|
224
|
-
flags += " " + " ".join(
|
|
225
|
-
flags += " " + " ".join(
|
|
226
|
-
flags += " " + " ".join(f"-l{lib}" for lib in
|
|
227
|
-
flags += " " + " ".join(f"-L{lib}" for lib in
|
|
354
|
+
flags += " " + " ".join(effective_link_args)
|
|
355
|
+
flags += " " + " ".join(effective_extra_objects)
|
|
356
|
+
flags += " " + " ".join(f"-l{lib}" for lib in effective_libraries)
|
|
357
|
+
flags += " " + " ".join(f"-L{lib}" for lib in effective_library_dirs)
|
|
228
358
|
flags += f" -o {library.get_qualified_name(self.platform)}"
|
|
229
359
|
if self.platform == "darwin":
|
|
230
360
|
flags += " -undefined dynamic_lookup"
|
|
@@ -233,15 +363,15 @@ class HatchCppPlatform(BaseModel):
|
|
|
233
363
|
elif "lld" in self.ld:
|
|
234
364
|
flags += " -fuse-ld=lld"
|
|
235
365
|
elif self.toolchain == "msvc":
|
|
236
|
-
flags += " " + " ".join(
|
|
237
|
-
flags += " " + " ".join(
|
|
366
|
+
flags += " " + " ".join(effective_link_args)
|
|
367
|
+
flags += " " + " ".join(effective_extra_objects)
|
|
238
368
|
flags += " /LD"
|
|
239
369
|
flags += f" /Fe:{library.get_qualified_name(self.platform)}"
|
|
240
370
|
flags += " /link /DLL"
|
|
241
371
|
if (Path(executable).parent / "libs").exists():
|
|
242
372
|
flags += f" /LIBPATH:{str(Path(executable).parent / 'libs')}"
|
|
243
|
-
flags += " " + " ".join(f"{lib}.lib" for lib in
|
|
244
|
-
flags += " " + " ".join(f"/LIBPATH:{lib}" for lib in
|
|
373
|
+
flags += " " + " ".join(f"{lib}.lib" for lib in effective_libraries)
|
|
374
|
+
flags += " " + " ".join(f"/LIBPATH:{lib}" for lib in effective_library_dirs)
|
|
245
375
|
# clean
|
|
246
376
|
while flags.count(" "):
|
|
247
377
|
flags = flags.replace(" ", " ")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hatch-cpp
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
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,9 +1,10 @@
|
|
|
1
|
-
hatch_cpp/__init__.py,sha256=
|
|
1
|
+
hatch_cpp/__init__.py,sha256=NiHzyZHO9thWWlAsLinBL03KdZwgTXAKh3yDMnAIKRs,114
|
|
2
2
|
hatch_cpp/config.py,sha256=LlwDBmD1nir08Y5GOl4wa29h2iJBtNRSzYMGHRVFJUo,3698
|
|
3
3
|
hatch_cpp/hooks.py,sha256=SQkF5WJIgzw-8rvlTzuQvBqdP6K3fHgnh6CZOZFag50,203
|
|
4
4
|
hatch_cpp/plugin.py,sha256=NcIDi7c9KH-_RkPeeCgWKoH5InIjw2eECswazwvGl_c,4304
|
|
5
5
|
hatch_cpp/utils.py,sha256=lxd3U3aMYsTS6DYMc1y17MR16LzgRzv92f_xh87LSg8,297
|
|
6
6
|
hatch_cpp/tests/test_hatch_build.py,sha256=q2IKTFi3Pq99UsOyL84V-C9VtFUs3ZcA9UlA8lpRW54,1553
|
|
7
|
+
hatch_cpp/tests/test_platform_specific.py,sha256=UaqYFoKfdxNG5p4ZlPsCJE50LB8HzzgVDRlYG03YHQM,17722
|
|
7
8
|
hatch_cpp/tests/test_projects.py,sha256=vs-kHdiHM7pCqM3oGQsSryq5blRi0HyK5QFfHxlJDi8,1773
|
|
8
9
|
hatch_cpp/tests/test_structs.py,sha256=cpzbPLneEbEONzXmPS1S9PL9mbhya4udc4eqTpU9w6w,2576
|
|
9
10
|
hatch_cpp/tests/test_project_basic/pyproject.toml,sha256=eqM1UVpNmJWDfsuO18ZG_VOV9I4tAWgsM5Dhf49X8Nc,694
|
|
@@ -56,10 +57,10 @@ hatch_cpp/tests/test_project_pybind_vcpkg/cpp/project/basic.hpp,sha256=LZSfCfhLY
|
|
|
56
57
|
hatch_cpp/tests/test_project_pybind_vcpkg/project/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
58
|
hatch_cpp/toolchains/__init__.py,sha256=anza4tXKxauobWMOUrxX3sEO0qs7sp6VdLXhLae3vkY,64
|
|
58
59
|
hatch_cpp/toolchains/cmake.py,sha256=VQYYqiOu0ZEF0IBuep35Xad7jryWy04-dHYYf7c0XgY,3331
|
|
59
|
-
hatch_cpp/toolchains/common.py,sha256=
|
|
60
|
+
hatch_cpp/toolchains/common.py,sha256=a8Pp6K5ykR04ZGXirQGx-xDw9xFm65O2sqrZpUlUqws,18165
|
|
60
61
|
hatch_cpp/toolchains/vcpkg.py,sha256=Gwv3YNXBngpdebvRuYuUcWCzPyDbmDvy8c0K7uV4k38,2146
|
|
61
|
-
hatch_cpp-0.3.
|
|
62
|
-
hatch_cpp-0.3.
|
|
63
|
-
hatch_cpp-0.3.
|
|
64
|
-
hatch_cpp-0.3.
|
|
65
|
-
hatch_cpp-0.3.
|
|
62
|
+
hatch_cpp-0.3.1.dist-info/METADATA,sha256=elXaQLudW-BbNb0B0ZL1YCbMCr39d7GpZUaSQRB_I40,9896
|
|
63
|
+
hatch_cpp-0.3.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
64
|
+
hatch_cpp-0.3.1.dist-info/entry_points.txt,sha256=RgXfjpD4iwomJQK5n7FnPkXzb5fOnF5v3DI5hbkgVcw,30
|
|
65
|
+
hatch_cpp-0.3.1.dist-info/licenses/LICENSE,sha256=FWyFTpd5xXEz50QpGDtsyIv6dgR2z_dHdoab_Nq_KMw,11452
|
|
66
|
+
hatch_cpp-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|