on which SAT is running
'''
-import os, sys, platform, pwd
+import os, sys, platform
def is_windows():
'''method that checks windows OS
raise Exception('USERNAME environment variable not set')
return os.environ['USERNAME']
else: # linux
+ import pwd
return pwd.getpwuid(os.getuid())[0]
def _lsb_release(args):
else:
sys.stderr.write(_(u"Unknown distribution: '%s'\n") % distrib)
sys.stderr.write(_(u"Please add your distribution to"
- " data/distrib.pyconf\n"))
+ " src/internal_config/distrib.pyconf\n"))
sys.exit(-1)
return distrib
if version in codes[distrib]:
version = codes[distrib][version]
+ if distrib == "CO":
+ version=version[0] #for centos, we only care for major version
return version
def get_python_version():
nb_proc=multiprocessing.cpu_count()
except :
nb_proc=int(os.sysconf('SC_NPROCESSORS_ONLN'))
- return nb_proc
\ No newline at end of file
+ return nb_proc