halfbrained / cuda_runner

Runner - plugin for CudaText. Adds commands to build/compile files/projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

allow sections in b-systems for other OSes

Alexey-T opened this issue · comments

e.g.

  "freebsd": {
     "cmd": ....
  }
  • freebsd
  • openbsd
  • netbsd
  • dragonflybsd
  • solaris

https://docs.python.org/3/library/os.html#os.uname
we need some hack of its result: "darwin" -> "osx"
and lower().

OS_KEY = os.uname()[0].lower()
if OS_KEY == 'darwin':
    OS_KEY = 'osx'

IS_WIN = OS_KEY=='windows'
IS_MAC = OS_KEY=='osx'
IS_LIN = not IS_WIN and not IS_MAC

from referenced os.uname doc:

Availability: recent flavors of Unix.

indeed on win7 it's missing
uname

works on macos :)

I'll look into this a bit later

IS_WIN = os.name=='nt'
IS_MAC = sys.platform=='darwin'
IS_LIN = not IS_WIN and not IS_MAC
OS_KEY = 'windows' if IS_WIN else ('osx' if IS_MAC else os.uname()[0].lower() )

thanks, changed

Works
linux on Ubuntu
osx on macos
windows on win
freebsd