예제 #1
0
파일: setup.py 프로젝트: abedzadeh/rpy
try:
    if sys.platform=="win32":
        RHOMES = os.environ['RHOMES'].split(';')
    else:
        RHOMES = os.environ['RHOMES'].split(':')
except:
    RHOMES = []

print "RHOMES=", RHOMES
print "DEBUG=", DEBUG

if not RHOMES:
    if sys.platform=="win32":
        RHOMES=rpy_wintools.get_RHOMES()
    else:
        RHOMES = [rpy_tools.get_R_HOME(force_exec=False)]
    print "Setting RHOMES to ", RHOMES

# ensure RHOMES is in ascii, since most command line tools are unhappy with unicode...
RHOMES = map( lambda x: x.encode('ascii'), RHOMES )

# On windows, check for/create the python link library 
#if sys.platform=="win32":
#    rpy_wintools.CreatePythonWinLib()

# On Mac OS X ("darwin") it is necessary to change the symlink
#   /Library/Frameworks/R.framework/Versions/Current
# to point to the current version of R in
#  /Library/Frameworks/R.framework/Versions/X.Y
# for that version of R to execute.  So, we need to store the original
# symlink here so we can restore it when we are done
예제 #2
0
except ImportError:
    try:
        from Numeric import *
        HAS_NUMERIC = 1
    except ImportError:
        HAS_NUMERIC = 0
        pass

# Get necessary paths and version information
RHOME = os.environ.get('RHOME', None)

if not RHOME:
    if rpy_options['RHOME'] is not None:
        RHOME = rpy_options['RHOME']
    else:
        RHOME = rpy_tools.get_R_HOME()

if rpy_options['RVERSION'] is not None:
    RVERSION = rpy_options['RVERSION']
else:
    RVERSION = rpy_tools.get_R_VERSION(RHOME)

if rpy_options['RVER'] is not None:
    RVER = rpy_options['RVER']
else:
    RVER = rpy_tools.get_R_VERSION_CODE(RVERSION)

if rpy_options['RUSER'] is not None:
    RUSER = rpy_options['RUSER']
else:
    RUSER = rpy_tools.get_R_USER()
예제 #3
0
파일: rpy.py 프로젝트: abedzadeh/rpy
    try:
        from Numeric import *
        HAS_NUMERIC = 1
    except ImportError:
        HAS_NUMERIC = 0
        pass


# Get necessary paths and version information
RHOME=os.environ.get('RHOME',None)
    
if not RHOME:
    if rpy_options['RHOME'] is not None:
        RHOME = rpy_options['RHOME']
    else:
        RHOME = rpy_tools.get_R_HOME()

if rpy_options['RVERSION'] is not None:
    RVERSION = rpy_options['RVERSION']
else:
    RVERSION = rpy_tools.get_R_VERSION(RHOME)

if rpy_options['RVER'] is not None:
    RVER = rpy_options['RVER']
else:
    RVER = rpy_tools.get_R_VERSION_CODE(RVERSION)

if rpy_options['RUSER'] is not None:
    RUSER = rpy_options['RUSER']
else:
    RUSER = rpy_tools.get_R_USER()