Skip to content

Commit 9dc5ff3

Browse files
committed
Resolve DOS paths
1 parent 8e00162 commit 9dc5ff3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/semiwrap/cmd_genmeson.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def getvar(self, item: VarTypes) -> str:
6767
if isinstance(item, InputFile):
6868
# .. this probably isn't right either, what should this be relative to?
6969
# .. TODO should use files()? but maybe only if this is actually a variable
70-
return _make_string(item.path.absolute().as_posix())
70+
return _make_string(item.path.resolve().as_posix())
7171
# var = f"sw_in_{self.idx}"
7272
elif isinstance(item, OutputFile):
7373
return _make_string(item.name)
@@ -101,7 +101,7 @@ def _render_build_target(r: RenderBuffer, vc: VarCache, bt: BuildTarget):
101101
if isinstance(arg, str):
102102
cmd.append(_make_string(arg))
103103
elif isinstance(arg, pathlib.Path):
104-
cmd.append(_make_string(arg.absolute().as_posix()))
104+
cmd.append(_make_string(arg.resolve().as_posix()))
105105
elif isinstance(arg, (BuildTarget, InputFile)):
106106
cmd.append(f"'@INPUT{len(tinput)}@'")
107107
tinput.append(vc.getvar(arg))

src/semiwrap/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def initialize(self, version: str, build_data: T.Dict[str, T.Any]) -> None:
2929
if self.target_name != "wheel":
3030
return
3131

32-
project_root = pathlib.Path(self.root)
32+
project_root = pathlib.Path(self.root).resolve()
3333

3434
config = parse_input(
3535
self.config, SemiwrapHatchlingConfig, "[tool.hatch.build.hooks.semiwrap]"

0 commit comments

Comments
 (0)