Exemple #1
0
    else:
        DEFINE = [('PRE_2_2', None)]
        UNDEF = []

    # configure the R paths
    #if sys.platform=="darwin":
    #  version = 
    #  if os.symlink("/Library/Frameworks/R.framework/Versions/Current")
    #  if RHOME.endswith('/'):
    #    RHOME = RHOME[:-1]
    #  print "RHOME=",os.path.join(os.path.dirname(RHOME),
    #                              os.readlink(RHOME) )
    #  sys.exit()
      
    
    RVERSION = rpy_tools.get_R_VERSION(RHOME, force_exec=True)
    RVER     = rpy_tools.get_R_VERSION_CODE(RVERSION)

    print "### Using R verion %s installed at %s ###" % (RVERSION, RHOME)

    r_libs = [ # Different verisons of R put .so/.dll in different places
              os.path.join(RHOME, 'bin'),  # R 2.0.0+
              os.path.join(RHOME, 'lib'),  # Pre 2.0.0
             ]

    print "RHOME=",RHOME

    base_source_files = ["src/rpymodule.c", "src/R_eval.c",
                         "src/io.c"]

    exists = os.path.exists
Exemple #2
0
        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()

VERBOSE = rpy_options['VERBOSE']

if VERBOSE:
    print "RHOME=", RHOME
Exemple #3
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()

VERBOSE=rpy_options['VERBOSE']

if VERBOSE:
    print "RHOME=",RHOME