mesonbuild/scripts/__init__.py
raw| 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | # Copyright 2016 The Meson development team |
| 3 | |
| 4 | from pathlib import PurePath |
| 5 | |
| 6 | def destdir_join(d1: str, d2: str) -> str: |
| 7 | if not d1: |
| 8 | return d2 |
| 9 | # c:\destdir + c:\prefix must produce c:\destdir\prefix |
| 10 | return str(PurePath(d1, *PurePath(d2).parts[1:])) |