-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Instead of making system calls throughout various methods in the class, create a function (utils.get_sys_info or something) that will return system information. Based on a brief scan, this is what RenvBuilder uses in it's logic flow to determine system information, and therefore folder names etct.:
operating system
We are currently working with linux so it would be good to throw an error if os.name returns anything other than posix.
platform
Linux (and Cygwin?) vs Windows vs Mac installs look very different. Throw an error for darwin, and win32 (and cygwin?).
size (32 vs 64 bit platforms)
On Linux machines 32 vs 64 installs look different. Mainly, 32 bit systems use "lib" and 64 bit systems use "lib64". Windows filesystems are much different. I don't know the difference between 32 and 64 bit on windows.
import os
import sys
if os.name == "posix":
if sys.platform in ["linux", "cygwin"]:
# do stuff
# do stuff
if sys.maxsize > 2**32:
_lib = "lib64"
else:
_lib = "lib"
else:
raise OSError