File: init_sys_path.py

package info (click to toggle)
kmc 3.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,132 kB
  • sloc: cpp: 39,219; python: 372; perl: 179; makefile: 157; sh: 34
file content (19 lines) | stat: -rw-r--r-- 622 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3
import sys
import os
import platform
import os
def is_windows():
    return not is_mac() and 'win' in platform.system().lower()
def is_linux():
    return 'linux' in platform.system().lower()
def is_mac():
    return 'darwin' in platform.system().lower()

if is_windows():
    sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'x64', 'Release'))
elif is_linux() or is_mac():
    sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'bin'))
    pass
else:
    raise RuntimeError("system other than linux, mac os and windows was detected which is now not supported.")