Revision: 526
http://rpy.svn.sourceforge.net/rpy/?rev=526&view=rev
Author: lgautier
Date: 2008-05-21 12:30:30 -0700 (Wed, 21 May 2008)
Log Message:
-----------
Fixes to *compile* under WinXP.
(having it to find R DLLs and run is coming next)
Modified Paths:
--------------
branches/rpy_nextgen/rpy/rinterface/rinterface.c
branches/rpy_nextgen/setup.py
Modified: branches/rpy_nextgen/rpy/rinterface/rinterface.c
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-05-15 05:21:26 UTC
(rev 525)
+++ branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-05-21 19:30:30 UTC
(rev 526)
@@ -239,13 +239,14 @@
embeddedR_isInitialized = PyBool_FromLong((long)1);
+#ifdef R_INTERFACE_PTRS
/* Redirect R console output */
- R_Outputfile = NULL;
-
extern void (*ptr_R_WriteConsole)(char *, int);
ptr_R_WriteConsole = EmbeddedR_WriteConsole;
+ R_Outputfile = NULL;
+ R_Consolefile = NULL;
+#endif
-
RPY_SEXP(globalEnv) = R_GlobalEnv;
RPY_SEXP(baseNameSpaceEnv) = R_BaseNamespace;
RPY_SEXP(na_string) = NA_STRING;
Modified: branches/rpy_nextgen/setup.py
===================================================================
--- branches/rpy_nextgen/setup.py 2008-05-15 05:21:26 UTC (rev 525)
+++ branches/rpy_nextgen/setup.py 2008-05-21 19:30:30 UTC (rev 526)
@@ -54,16 +54,14 @@
def get_rconfig(RHOME, about):
r_exec = os.path.join(RHOME, 'bin', 'R')
- # Twist if Win32
- if sys.platform == "win32":
- rp = os.popen3('"'+r_exec+'" CMD config '+about)[2]
- else:
- rp = os.popen('"'+r_exec+'" CMD config '+about)
+ cmd = '"'+r_exec+'" CMD config '+about
+ rp = os.popen(cmd)
rconfig = rp.readline()
#Twist if 'R RHOME' spits out a warning
if rconfig.startswith("WARNING"):
rconfig = rp.readline()
rconfig = rconfig.strip()
+ rconfig = re.match('^(-L.+) (-l.+)$', rconfig).groups()
return rconfig
rnewest = [0, 0, 0]
@@ -106,8 +104,9 @@
libraries=['R', 'Rlapack', 'Rblas'],
library_dirs=r_libs,
runtime_library_dirs=r_libs,
- extra_link_args=[get_rconfig(RHOME, 'LAPACK_LIBS'),
- get_rconfig(RHOME, 'BLAS_LIBS')],
+ extra_link_args=get_rconfig(RHOME, '--ldflags') +\
+ get_rconfig(RHOME, 'LAPACK_LIBS') +\
+ get_rconfig(RHOME, 'BLAS_LIBS'),
)
setup(name = "rpython",
@@ -115,7 +114,7 @@
description = "Python interface to the R language",
url = "http://rpy.sourceforge.net",
license = "(L)GPL",
- ext_modules = [rinterface],
+ ext_modules = [rinterface, ],
package_dir = {pack_name: 'rpy'},
packages = [pack_name,
pack_name+'.robjects',
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list