Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Centralize system checks to one method and rework RenvBuilder around this idea. #47

@grabear

Description

@grabear

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.:

  • image

  • image

  • image

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions