1
0
Fork 0
mirror of https://github.com/fastogt/pyfastogt synced 2025-03-09 23:38:55 +00:00

Some usefull functions

This commit is contained in:
topilski 2017-05-01 21:04:55 +03:00
parent 33f0dfd83d
commit 3ce89db833
3 changed files with 22 additions and 9 deletions

View file

@ -276,3 +276,10 @@ SUPPORTED_BUILD_SYSTEMS = [BuildSystem('ninja', ['ninja'], '-GNinja'),
def get_supported_build_system_by_name(name) -> BuildSystem:
return next((x for x in SUPPORTED_BUILD_SYSTEMS if x.name() == name), None)
def stable_path(path) -> str:
if get_os() == 'windows':
return '/' + path.replace("\\", "/").replace(":", '')
return path.replace("\\", "/").replace(":", '')