File: __init__.py

package info (click to toggle)
meson 1.10.2-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 24,820 kB
  • sloc: python: 90,960; ansic: 7,391; cpp: 2,434; f90: 482; asm: 218; sh: 143; xml: 109; java: 103; cs: 62; objc: 33; lex: 13; fortran: 12; makefile: 10; yacc: 9; javascript: 6
file content (10 lines) | stat: -rw-r--r-- 303 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
# SPDX-License-Identifier: Apache-2.0
# Copyright 2016 The Meson development team

from pathlib import PurePath

def destdir_join(d1: str, d2: str) -> str:
    if not d1:
        return d2
    # c:\destdir + c:\prefix must produce c:\destdir\prefix
    return str(PurePath(d1, *PurePath(d2).parts[1:]))